Miguel Nogueira
596a469e15
Adds user invitation to teams, and framework for assigning taems Also adds user acc. deletion.
44 lines
919 B
PHP
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()
|
|
{
|
|
//
|
|
}
|
|
}
|