mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
Stable to master (#42611)
Fix PostgreSQL migration for ban DB refactor (#42609) This didn't come up in testing. The ban hit foreign key was added before the data was migrated, so it didn't work. Fix that.
This commit is contained in:
@@ -240,14 +240,6 @@ namespace Content.Server.Database.Migrations.Postgres
|
|||||||
column: "ban_id",
|
column: "ban_id",
|
||||||
unique: true);
|
unique: true);
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_server_ban_hit_ban_ban_id",
|
|
||||||
table: "server_ban_hit",
|
|
||||||
column: "ban_id",
|
|
||||||
principalTable: "ban",
|
|
||||||
principalColumn: "ban_id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.Sql("""
|
migrationBuilder.Sql("""
|
||||||
CREATE INDEX "IX_ban_address_address"
|
CREATE INDEX "IX_ban_address_address"
|
||||||
ON ban_address
|
ON ban_address
|
||||||
@@ -490,6 +482,14 @@ namespace Content.Server.Database.Migrations.Postgres
|
|||||||
AND round_id IS NOT NULL;
|
AND round_id IS NOT NULL;
|
||||||
""");
|
""");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_server_ban_hit_ban_ban_id",
|
||||||
|
table: "server_ban_hit",
|
||||||
|
column: "ban_id",
|
||||||
|
principalTable: "ban",
|
||||||
|
principalColumn: "ban_id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
migrationBuilder.DropForeignKey(
|
||||||
name: "FK_server_ban_hit_server_ban_ban_id",
|
name: "FK_server_ban_hit_server_ban_ban_id",
|
||||||
table: "server_ban_hit");
|
table: "server_ban_hit");
|
||||||
|
|||||||
Reference in New Issue
Block a user