Merge pull request #2080 from burakcakirel/missing-migration
Added missing migration from 2.1.12
This commit is contained in:
commit
41e29de11b
@ -30,6 +30,18 @@ class Version2114 extends Listener
|
|||||||
return;
|
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]);
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
|
|
||||||
$this->updateMediaTables();
|
$this->updateMediaTables();
|
||||||
|
44
app/Listeners/Update/V21/Version2116.php
Normal file
44
app/Listeners/Update/V21/Version2116.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners\Update\V21;
|
||||||
|
|
||||||
|
use App\Abstracts\Listeners\Update as Listener;
|
||||||
|
use App\Events\Install\UpdateFinished as Event;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class Version2116 extends Listener
|
||||||
|
{
|
||||||
|
const ALIAS = 'core';
|
||||||
|
|
||||||
|
const VERSION = '2.1.16';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param $event
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(Event $event)
|
||||||
|
{
|
||||||
|
if ($this->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]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,7 @@ class Event extends Provider
|
|||||||
'App\Listeners\Update\V21\Version219',
|
'App\Listeners\Update\V21\Version219',
|
||||||
'App\Listeners\Update\V21\Version2112',
|
'App\Listeners\Update\V21\Version2112',
|
||||||
'App\Listeners\Update\V21\Version2114',
|
'App\Listeners\Update\V21\Version2114',
|
||||||
|
'App\Listeners\Update\V21\Version2116',
|
||||||
],
|
],
|
||||||
'Illuminate\Auth\Events\Login' => [
|
'Illuminate\Auth\Events\Login' => [
|
||||||
'App\Listeners\Auth\Login',
|
'App\Listeners\Auth\Login',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user