staffmanager/database/migrations/2020_10_04_163715_team_has_vacancy.php
Miguel Nogueira 596a469e15 Add user invitation facilities RSM-5
Adds user invitation to teams, and framework for assigning taems
Also adds user acc. deletion.
2020-10-08 19:19:10 +01:00

44 lines
919 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class TeamHasVacancy extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('team_has_vacancy', function(Blueprint $table){
$table->id();
$table->integer('team_id')->unsigned();
$table->bigInteger('vacancy_id')->unsigned();
$table->timestamps();
$table->foreign('team_id')
->references('id')
->on(config('teamwork.teams_table'));
$table->foreign('vacancy_id')
->references('id')
->on('vacancies');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}