diff --git a/app/Listeners/Update/V21/Version2114.php b/app/Listeners/Update/V21/Version2114.php index a409ba6cb..6720bc357 100644 --- a/app/Listeners/Update/V21/Version2114.php +++ b/app/Listeners/Update/V21/Version2114.php @@ -30,6 +30,18 @@ class Version2114 extends Listener return; } + $migration = DB::table('migrations') + ->where('migration', '2016_06_27_000001_create_mediable_test_tables') + ->first(); + + if ($migration === null) { + DB::table('migrations')->insert([ + 'id' => DB::table('migrations')->max('id') + 1, + 'migration' => '2016_06_27_000001_create_mediable_test_tables', + 'batch' => DB::table('migrations')->max('batch') + 1, + ]); + } + Artisan::call('migrate', ['--force' => true]); $this->updateMediaTables(); diff --git a/app/Listeners/Update/V21/Version2116.php b/app/Listeners/Update/V21/Version2116.php new file mode 100644 index 000000000..1e9ad7217 --- /dev/null +++ b/app/Listeners/Update/V21/Version2116.php @@ -0,0 +1,44 @@ +skipThisUpdate($event)) { + return; + } + + $migration = DB::table('migrations') + ->where('migration', '2016_06_27_000001_create_mediable_test_tables') + ->first(); + + if ($migration === null) { + DB::table('migrations')->insert([ + 'id' => DB::table('migrations')->max('id') + 1, + 'migration' => '2016_06_27_000001_create_mediable_test_tables', + 'batch' => DB::table('migrations')->max('batch') + 1, + ]); + } + + Artisan::call('migrate', ['--force' => true]); + + } +} diff --git a/app/Providers/Event.php b/app/Providers/Event.php index 766c9a89a..a07c34b5a 100644 --- a/app/Providers/Event.php +++ b/app/Providers/Event.php @@ -32,6 +32,7 @@ class Event extends Provider 'App\Listeners\Update\V21\Version219', 'App\Listeners\Update\V21\Version2112', 'App\Listeners\Update\V21\Version2114', + 'App\Listeners\Update\V21\Version2116', ], 'Illuminate\Auth\Events\Login' => [ 'App\Listeners\Auth\Login',