Closed oskogstad closed 3 months ago
Did not properly check that the migration worked with data in the database 🤦🏼 Instead of
migrationBuilder.RenameColumn( name: "ElementId", table: "LocalizationSet", newName: "AttachmentId"); migrationBuilder.RenameIndex( name: "IX_LocalizationSet_ElementId", table: "LocalizationSet", newName: "IX_LocalizationSet_AttachmentId");
we need to drop the column, or else we get an FK error on the old ElementIds against the new attachment table.
migrationBuilder.DropIndex( name: "IX_LocalizationSet_ElementId", table: "LocalizationSet"); migrationBuilder.DropColumn( name: "ElementId", table: "LocalizationSet"); migrationBuilder.AddColumn<Guid>( name: "AttachmentId", table: "LocalizationSet", type: "uuid", nullable: true); migrationBuilder.CreateIndex( name: "IX_LocalizationSet_AttachmentId", table: "LocalizationSet", column: "AttachmentId", unique: true);
Issues 1 New issue 0 Accepted issues
Measures 0 Security Hotspots 0.0% Coverage on New Code 0.0% Duplication on New Code
See analysis details on SonarCloud
Did not properly check that the migration worked with data in the database 🤦🏼 Instead of
we need to drop the column, or else we get an FK error on the old ElementIds against the new attachment table.