forked from miguel456/rbrecruiter
Optimize tables
This commit is contained in:
parent
7c22894e94
commit
f514c4f848
@ -28,7 +28,7 @@ class CreateApplicationsTable extends Migration
|
||||
'STAGE_INTERVIEW',
|
||||
'APPROVED',
|
||||
'DENIED'
|
||||
]);
|
||||
])->default('STAGE_SUBMITTED');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
@ -15,7 +15,14 @@ class CreateVotesTable extends Migration
|
||||
{
|
||||
Schema::create('votes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('userID')->unsigned();
|
||||
$table->enum('allowedVoteType', [
|
||||
'VOTE_DENY',
|
||||
'VOTE_APPROVE'
|
||||
]);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('userID')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ class CreateAppointmentsTable extends Migration
|
||||
'SCHEDULED',
|
||||
'CONCLUDED'
|
||||
])->default('SCHEDULED');
|
||||
$table->text('meetingNotes');
|
||||
$table->text('meetingNotes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLogsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('logs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigIncrements('userID');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('logs');
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class VotesHasApplication extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('votes_has_application', function (Blueprint $table){
|
||||
|
||||
$table->id('id');
|
||||
$table->bigInteger('vote_id')->unsigned();
|
||||
$table->bigInteger('application_id')->unsigned();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('vote_id')->references('id')->on('votes');
|
||||
$table->foreign('application_id')->references('id')->on('applications');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user