Julian Prieber 2023-03-21 22:24:52 +01:00
parent b02bb34ad3
commit 158f28e2fc

View File

@ -107,10 +107,20 @@ use Illuminate\Support\Facades\File;
/* Updates button database entries */ /* Updates button database entries */
Schema::disableForeignKeyConstraints(); Schema::disableForeignKeyConstraints();
try {Artisan::call('migrate');} catch (exception $e) {}
try {DB::table('buttons')->delete();} catch (exception $e) {} // Run migrations
try {DB::table('buttons')->truncate();} catch (exception $e) {} Schema::dropIfExists('buttons');
try {Artisan::call('db:seed --class="ButtonSeeder" --force');} catch (exception $e) {} Schema::create('buttons', function (Blueprint $table) {
// Define table columns here
});
// Clear button table
DB::table('buttons')->truncate();
// Seed button table
$seeder = new ButtonSeeder();
$seeder->run();
Schema::enableForeignKeyConstraints(); Schema::enableForeignKeyConstraints();
try { try {