From 9e28aa9c0c8e1bc1414ba24f083ca3982e074e2f Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 16 Nov 2022 21:28:32 +0100 Subject: [PATCH] Remove first_activity and first_subactivity from database --- ...408_create_memberships_activity_column.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 database/migrations/2022_11_08_154408_create_memberships_activity_column.php diff --git a/database/migrations/2022_11_08_154408_create_memberships_activity_column.php b/database/migrations/2022_11_08_154408_create_memberships_activity_column.php new file mode 100644 index 00000000..d4533a28 --- /dev/null +++ b/database/migrations/2022_11_08_154408_create_memberships_activity_column.php @@ -0,0 +1,38 @@ +dropForeign(['first_subactivity_id']); + $table->dropForeign(['first_activity_id']); + }); + + Schema::table('members', function (Blueprint $table) { + $table->dropColumn('first_activity_id'); + $table->dropColumn('first_subactivity_id'); + }); + + Schema::table('memberships', function (Blueprint $table) { + $table->foreign('member_id')->references('id')->on('members'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +};