-- AlterTable: several combatants can be marked as targets at once (an area attack) ALTER TABLE "encounters" ADD COLUMN "targetParticipantIds" TEXT[] DEFAULT ARRAY[]::TEXT[]; -- Carry over a single target marked before this. UPDATE "encounters" SET "targetParticipantIds" = ARRAY["targetParticipantId"] WHERE "targetParticipantId" IS NOT NULL; ALTER TABLE "encounters" DROP COLUMN "targetParticipantId";