-- Remove existing unique constraint and index 
ALTER TABLE "COMPUTED_VALUES" DROP CONSTRAINT "COMPUTED_VALUES_UK1";
DROP INDEX "COMPUTED_VALUES_UK1";

-- Add chunk identifier
ALTER TABLE "COMPUTED_VALUES" ADD ("CHUNK_ID" NUMBER(11,0) NOT NULL);

-- Recreate unique constraint and index with chunk identifier
CREATE UNIQUE INDEX "COMPUTED_VALUES_UK1" ON "COMPUTED_VALUES" ("TENANT_ID", "ELECTION_EVENT_ID", "VERIFICATION_CARD_SET_ID", "CHUNK_ID");
ALTER TABLE "COMPUTED_VALUES" ADD CONSTRAINT "COMPUTED_VALUES_UK1" UNIQUE ("TENANT_ID", "ELECTION_EVENT_ID", "VERIFICATION_CARD_SET_ID", "CHUNK_ID") ENABLE;
