forked from miguel456/rbrecruiter
Enforce data consistency
This commit is contained in:
parent
f514c4f848
commit
beee71e4c3
|
@ -22,7 +22,7 @@ class CreateProfilesTable extends Migration
|
|||
'gravatar' // Email profile
|
||||
]);
|
||||
$table->text('socialLinks');
|
||||
$table->bigIncrements('userID');
|
||||
$table->bigInteger('userID')->unsigned();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('userID')->references('id')->on('users')->onDelete('cascade');
|
||||
|
|
|
@ -20,8 +20,8 @@ class CreateApplicationsTable extends Migration
|
|||
*/
|
||||
Schema::create('applications', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigIncrements('applicantUserID'); // 1-1
|
||||
$table->bigIncrements('applicantFormResponseID'); // 1-*
|
||||
$table->bigInteger('applicantUserID')->unsigned(); // 1-1
|
||||
$table->bigInteger('applicantFormResponseID')->unsigned(); // 1-*
|
||||
$table->enum('applicationStatus', [
|
||||
'STAGE_SUBMITTED',
|
||||
'STAGE_PEERAPPROVAL',
|
||||
|
|
|
@ -19,7 +19,7 @@ class CreateVacanciesTable extends Migration
|
|||
$table->longText('vacancyDescription');
|
||||
$table->string('permissionGroupName');
|
||||
$table->string('discordRoleID');
|
||||
$table->bigIncrements('vacancyFormID');
|
||||
$table->bigInteger('vacancyFormID')->unsigned();
|
||||
$table->integer('vacancyCount')->default(3);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ class CreateResponsesTable extends Migration
|
|||
{
|
||||
Schema::create('responses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigIncrements('responseFormID');
|
||||
$table->bigInteger('responseFormID')->unsigned();
|
||||
$table->longText('responseData');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue