diff --git a/permitting/ddl/FTA/tenure_application_purp_code.sql b/permitting/ddl/FTA/tenure_application_purp_code.sql index b6f01b1..e013c67 100644 --- a/permitting/ddl/FTA/tenure_application_purp_code.sql +++ b/permitting/ddl/FTA/tenure_application_purp_code.sql @@ -1,7 +1,14 @@ -CREATE TABLE fta_replication.tenure_application_purp_code ( - tenure_application_purp_code VARCHAR(3) NOT NULL, - description VARCHAR(120) NOT NULL, - effective_date TIMESTAMP(0) NOT NULL, - expiry_date TIMESTAMP(0) NOT NULL, - update_timestamp TIMESTAMP(0) NOT NULL +CREATE TABLE THE.TENURE_APPLICATION_PURP_CODE ( + TENURE_APPLICATION_PURP_CODE VARCHAR(3), + DESCRIPTION VARCHAR(120), + EFFECTIVE_DATE TIMESTAMP(0), + EXPIRY_DATE TIMESTAMP(0), + UPDATE_TIMESTAMP TIMESTAMP(0), + CONSTRAINT SYS_C0019423 CHECK ("TENURE_APPLICATION_PURP_CODE" IS NOT NULL), + CONSTRAINT SYS_C0019425 CHECK ("DESCRIPTION" IS NOT NULL), + CONSTRAINT SYS_C0019427 CHECK ("EFFECTIVE_DATE" IS NOT NULL), + CONSTRAINT SYS_C0019429 CHECK ("EXPIRY_DATE" IS NOT NULL), + CONSTRAINT SYS_C0019431 CHECK ("UPDATE_TIMESTAMP" IS NOT NULL), + CONSTRAINT TAPC_PK PRIMARY KEY (TENURE_APPLICATION_PURP_CODE) ); +CREATE UNIQUE INDEX TAPC_PK ON THE.TENURE_APPLICATION_PURP_CODE (TENURE_APPLICATION_PURP_CODE); \ No newline at end of file