add: More cascading.
parent
deb3c2f4be
commit
a762ab2ad8
|
|
@ -19,7 +19,7 @@ return new class extends Migration
|
|||
$table->timestamp('start_time')->useCurrent();
|
||||
$table->timestamp('end_time')->useCurrent();
|
||||
|
||||
$table->foreign('guild_id')->references('id')->on('guild');
|
||||
$table->foreign('guild_id')->references('id')->on('guild')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ return new class extends Migration
|
|||
$table->dateTime('time')->nullable();
|
||||
|
||||
$table->index(['notice', 'id', 'guild_id'], 'aaa');
|
||||
$table->foreign('guild_id')->references('id')->on('guild');
|
||||
$table->foreign('guild_id')->references('id')->on('guild')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return new class extends Migration
|
|||
$table->set('auth', ['ADD_MEMBER', 'REMOVE_MEMEBER', 'NOTICE', 'USE_SKILL'])->nullable();
|
||||
|
||||
$table->primary(['guild_id', 'grade']);
|
||||
$table->foreign('guild_id')->references('id')->on('guild');
|
||||
$table->foreign('guild_id')->references('id')->on('guild')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ return new class extends Migration
|
|||
$table->integer('result1')->default(0);
|
||||
$table->integer('result2')->default(0);
|
||||
|
||||
$table->foreign('guild1')->references('id')->on('guild');
|
||||
$table->foreign('guild2')->references('id')->on('guild');
|
||||
$table->foreign('guild1')->references('id')->on('guild')->cascadeOnDelete();
|
||||
$table->foreign('guild2')->references('id')->on('guild')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ return new class extends Migration
|
|||
$table->unsignedInteger('war_id');
|
||||
|
||||
$table->primary(['war_id', 'login']);
|
||||
$table->foreign('login')->references('login')->on('account');
|
||||
$table->foreign('guild')->references('id')->on('guild');
|
||||
$table->foreign('war_id')->references('id')->on('guild_war_reservation');
|
||||
$table->foreign('login')->references('login')->on('account')->cascadeOnDelete();
|
||||
$table->foreign('guild')->references('id')->on('guild')->cascadeOnDelete();
|
||||
$table->foreign('war_id')->references('id')->on('guild_war_reservation')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ return new class extends Migration
|
|||
$table->unsignedInteger('price')->default(0);
|
||||
$table->enum('enable', ['YES', 'NO'])->default('NO');
|
||||
|
||||
$table->foreign('guild_id')->references('id')->on('guild');
|
||||
$table->foreign('guild_id')->references('id')->on('guild')->cascadeOnDelete();
|
||||
});
|
||||
|
||||
// Populate the table data
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ return new class extends Migration
|
|||
$table->float('z_rot', null, 0);
|
||||
$table->integer('life')->default(0);
|
||||
|
||||
$table->foreign('land_id')->references('id')->on('land');
|
||||
$table->foreign('land_id')->references('id')->on('land')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue