CREATE SEQUENCE  "CLEANSED_BALLOT_BOX_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE  NOORDER  NOCYCLE;

CREATE TABLE "CLEANSED_BALLOT_BOX"
(	"ID" NUMBER(11,0) PRIMARY KEY NOT NULL,
    "TENANT_ID" VARCHAR2(100 CHAR) NOT NULL,
    "ELECTION_EVENT_ID" VARCHAR2(100 CHAR) NOT NULL,
    "VOTING_CARD_ID" VARCHAR2(100 CHAR) NOT NULL,
    "BALLOT_ID" VARCHAR2(100 CHAR) NOT NULL,
    "BALLOT_BOX_ID" VARCHAR2(100 CHAR) NOT NULL,
    "ENCRYPTED_VOTE" CLOB,

    CONSTRAINT "CLEANSED_BB_UK_SINGLE_VOTE" UNIQUE ("TENANT_ID", "ELECTION_EVENT_ID","VOTING_CARD_ID", "BALLOT_ID", "BALLOT_BOX_ID")
) ;

