1
0
Fork 0

Merge branch 'pixelfed:dev' into jippi-fork

This commit is contained in:
Christian Winther 2024-01-16 21:49:51 +01:00 committed by GitHub
commit 24220ef2a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,11 @@ return new class extends Migration
});
Schema::table('user_roles', function (Blueprint $table) {
$table->dropIndex('user_roles_profile_id_unique');
$schemaManager = Schema::getConnection()->getDoctrineSchemaManager();
$indexesFound = $schemaManager->listTableIndexes('user_roles');
if (array_key_exists('user_roles_profile_id_unique', $indexesFound)) {
$table->dropIndex('user_roles_profile_id_unique');
}
$table->unsignedBigInteger('profile_id')->unique()->nullable()->index()->change();
});
}