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) { + // + }); + } +}