Disable strict mode before running migrations
This will ensure strict mode is not applied while running migrations for both modules and plugins, either when installing or removing. We don't need to call disableStrictMode from UpdateManager::uninstall() as it is called within the plugin removal methods, which are run first. To force strict mode to be enabled, set 'strict' => true in the database config.
This commit is contained in:
parent
48090351bd
commit
e2b110a611
|
|
@ -366,6 +366,8 @@ class UpdateManager
|
|||
*/
|
||||
public function migrateModule($module)
|
||||
{
|
||||
DbDongle::disableStrictMode();
|
||||
|
||||
$this->migrator->run(base_path() . '/modules/'.strtolower($module).'/database/migrations');
|
||||
|
||||
$this->note($module);
|
||||
|
|
|
|||
|
|
@ -385,6 +385,8 @@ class VersionManager
|
|||
*/
|
||||
protected function applyDatabaseScript($code, $version, $script)
|
||||
{
|
||||
DbDongle::disableStrictMode();
|
||||
|
||||
/*
|
||||
* Execute the database PHP script
|
||||
*/
|
||||
|
|
@ -405,6 +407,8 @@ class VersionManager
|
|||
*/
|
||||
protected function removeDatabaseScript($code, $version, $script)
|
||||
{
|
||||
DbDongle::disableStrictMode();
|
||||
|
||||
/*
|
||||
* Execute the database PHP script
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue