-- Every map now belongs to a location. The free-floating "top-level map"
-- concept is gone — the property aerial is just the Sunrock-root location's
-- own map. Tighten the column and switch the FK to CASCADE (an orphan map
-- of a deleted location would be meaningless).

ALTER TABLE "Map" ALTER COLUMN "locationId" SET NOT NULL;

ALTER TABLE "Map" DROP CONSTRAINT "Map_locationId_fkey";
ALTER TABLE "Map"
  ADD CONSTRAINT "Map_locationId_fkey"
  FOREIGN KEY ("locationId") REFERENCES "Location"("id")
  ON DELETE CASCADE ON UPDATE CASCADE;
