mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 15:47:26 +00:00
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:
committed by
Coryler
parent
7419408ec5
commit
de269d0176
@@ -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