From bbd9e1cf0e2682853b538e2fb7170acadb99abb3 Mon Sep 17 00:00:00 2001 From: Kris Date: Wed, 8 Jan 2025 19:13:12 +0100 Subject: [PATCH] :bug: wtf twitter and mastodon (#3106) --- ..._01_08_000001_what_the_fuck_twitter_id.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 database/migrations/2025_01_08_000001_what_the_fuck_twitter_id.php diff --git a/database/migrations/2025_01_08_000001_what_the_fuck_twitter_id.php b/database/migrations/2025_01_08_000001_what_the_fuck_twitter_id.php new file mode 100644 index 000000000..b79fe2415 --- /dev/null +++ b/database/migrations/2025_01_08_000001_what_the_fuck_twitter_id.php @@ -0,0 +1,45 @@ +string('twitter_id')->nullable()->change(); + }); + + Schema::table('social_login_profiles', function(Blueprint $table) { + $table->dropForeign(['mastodon_server']); + + $table->unsignedBigInteger('mastodon_server')->nullable()->change(); + }); + + Schema::table('social_login_profiles', function(Blueprint $table) { + $table->foreign('mastodon_server')->references('id')->on('mastodon_servers'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void { + Schema::table('social_login_profiles', function(Blueprint $table) { + $table->string('twitter_id')->nullable(false)->change(); + }); + + Schema::table('social_login_profiles', function(Blueprint $table) { + $table->dropForeign(['mastodon_server']); + + $table->unsignedBigInteger('mastodon_server')->nullable(false)->change(); + }); + + Schema::table('social_login_profiles', function(Blueprint $table) { + $table->foreign('mastodon_server')->references('id')->on('mastodon_servers'); + }); + } +};