Skip to content

Commit e75121c

Browse files
committed
Fixed updater
1 parent 075f360 commit e75121c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

resources/views/components/finishing.blade.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@
149149
Page::first()->update(['home_message' => $home_message]);
150150
}
151151
152+
$migrationFiles = glob(database_path('migrations/*.php'));
153+
154+
$fileNames = array_map(function ($file) {
155+
return basename($file, '.php');
156+
}, $migrationFiles);
157+
158+
foreach ($fileNames as $fileName) {
159+
if (!DB::table('migrations')->where('migration', $fileName)->exists()) {
160+
DB::table('migrations')->insert(['migration' => $fileName, 'batch' => 1]);
161+
}
162+
}
163+
152164
/* Updates button database entries */
153165
Schema::disableForeignKeyConstraints();
154166
$existingMigration = '2021_03_17_044922_create_buttons_table';

0 commit comments

Comments
 (0)