diff --git a/src/database/migrations.stub b/src/database/migrations.stub index 49323c4..d41d0ea 100644 --- a/src/database/migrations.stub +++ b/src/database/migrations.stub @@ -28,6 +28,10 @@ class TeamworkSetupTables extends Migration $table->string('accept_token'); $table->string('deny_token'); $table->timestamps(); + $table->foreign( 'team_id' ) + ->references( 'id' ) + ->on( \Config::get( 'teamwork.teams_table' ) ) + ->onDelete( 'cascade' ); }); Schema::create( \Config::get( 'teamwork.teams_table' ), function ( $table )