RSM-3 Update vacancy schema with team assoc
This commit is contained in:
parent
b68449d3bf
commit
dbeddd6fdb
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddTeamAssocToVacancies extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
|
||||
$table->bigInteger('ownerTeamID')->unsigned()->after('vacancyFormID');
|
||||
|
||||
$table->foreign('ownerTeamID')
|
||||
->references('team_id')
|
||||
->on('teams')
|
||||
->onDelete('cascade')
|
||||
->onUpdate('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('vacancies', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue