From dbeddd6fdb7ca37d89c1e5c1cd06a5205274203c Mon Sep 17 00:00:00 2001 From: Miguel N Date: Thu, 10 Sep 2020 19:24:55 +0100 Subject: [PATCH] RSM-3 Update vacancy schema with team assoc --- ..._10_181914_add_team_assoc_to_vacancies.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 database/migrations/2020_09_10_181914_add_team_assoc_to_vacancies.php diff --git a/database/migrations/2020_09_10_181914_add_team_assoc_to_vacancies.php b/database/migrations/2020_09_10_181914_add_team_assoc_to_vacancies.php new file mode 100644 index 0000000..24465fa --- /dev/null +++ b/database/migrations/2020_09_10_181914_add_team_assoc_to_vacancies.php @@ -0,0 +1,39 @@ +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) { + // + }); + } +}