From 8a0bcea4a9055e7b2df2d492c6a11a7672421e45 Mon Sep 17 00:00:00 2001 From: Athwal Date: Fri, 20 Sep 2024 10:33:06 -0700 Subject: [PATCH] Update tenure_application_purp_code.sql --- .../ddl/FTA/tenure_application_purp_code.sql | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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