Manage FK checks

This commit is contained in:
DariusIII
2025-09-03 21:22:45 +02:00
parent d34ce6549f
commit e1e2448a3a
@@ -12,6 +12,7 @@ return new class extends Migration
*/
public function up()
{
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
DB::table('categories')->insert([
'id' => 6047,
'title' => 'OnlyFans',
@@ -22,6 +23,7 @@ return new class extends Migration
'minsizetoformrelease' => 0,
'maxsizetoformrelease' => 0,
]);
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
}
/**
@@ -31,6 +33,8 @@ return new class extends Migration
*/
public function down()
{
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
DB::table('categories')->where('id', 6047)->delete();
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
}
};