-- Modify "InstallationPosition" table
ALTER TABLE "public"."InstallationPosition" DROP CONSTRAINT "fk_InstallationPosition_Installation", DROP COLUMN "Installation_Id", ADD CONSTRAINT "fk_InstallationPosition_Installation" FOREIGN KEY ("Installation_Code") REFERENCES "public"."Installation" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Modify "Unit" table
ALTER TABLE "public"."Unit" DROP CONSTRAINT "fk_Unit_Installation", DROP COLUMN "Installation_Id", ADD CONSTRAINT "fk_Unit_Installation" FOREIGN KEY ("Installation_Code") REFERENCES "public"."Installation" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Modify "UnitPosition" table
ALTER TABLE "public"."UnitPosition" DROP CONSTRAINT "fk_UnitPosition_Unit", DROP COLUMN "Unit_Id", ADD CONSTRAINT "fk_UnitPosition_Unit" FOREIGN KEY ("Unit_Code") REFERENCES "public"."Unit" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
