Merge pull request #4866 from pixelfed/staging

Update migration, fixes #4863
pull/4867/head
daniel 1 year ago committed by GitHub
commit 84b63f8aa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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();
});
}

Loading…
Cancel
Save