Skip to content

Commit

Permalink
🐛 wtf twitter and mastodon (#3106)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu authored Jan 8, 2025
1 parent 88e8b81 commit bbd9e1c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions database/migrations/2025_01_08_000001_what_the_fuck_twitter_id.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void {
Schema::table('social_login_profiles', function(Blueprint $table) {
$table->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');
});
}
};

0 comments on commit bbd9e1c

Please sign in to comment.