0% found this document useful (0 votes)
42 views1 page

Create Dummy Table

This document describes dropping and recreating the tm_cases_intern table in the fdhdata schema of a PostgreSQL database. The table will contain case data with fields like narrative, status, dates, identifiers and more. Primary and unique keys are defined to index the table on the cases_id and _ID_NUMERIC_PART_NO fields respectively.

Uploaded by

Marco Chua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views1 page

Create Dummy Table

This document describes dropping and recreating the tm_cases_intern table in the fdhdata schema of a PostgreSQL database. The table will contain case data with fields like narrative, status, dates, identifiers and more. Primary and unique keys are defined to index the table on the cases_id and _ID_NUMERIC_PART_NO fields respectively.

Uploaded by

Marco Chua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

-- Table: fdhdata.

tm_cases_intern

DROP TABLE fdhdata.tm_cases_intern;

CREATE TABLE IF NOT EXISTS fdhdata.tm_cases_intern


(
"Narrative" character varying(32768) COLLATE pg_catalog."default",
"QC_Completed_Flag" character varying(1) COLLATE pg_catalog."default",
"Report_Filed_Flag" character varying(1) COLLATE pg_catalog."default",
activation_date date,
agency_ref_id character varying(14) COLLATE pg_catalog."default",
case_category character varying(10) COLLATE pg_catalog."default",
case_closed_dttm timestamp without time zone,
case_description character varying(50) COLLATE pg_catalog."default",
case_disposition character varying(10) COLLATE pg_catalog."default",
case_opened_dttm timestamp without time zone,
case_owner character varying(4000) COLLATE pg_catalog."default",
case_primary_status character varying(1) COLLATE pg_catalog."default",
case_priority character varying(1) COLLATE pg_catalog."default",
case_status character varying(10) COLLATE pg_catalog."default",
case_subcategory character varying(10) COLLATE pg_catalog."default",
case_summary character varying(350) COLLATE pg_catalog."default",
case_type character varying(10) COLLATE pg_catalog."default",
cases_id character varying(36) COLLATE pg_catalog."default" NOT NULL,
closing_comment character varying(500) COLLATE pg_catalog."default",
created_at_dttm timestamp without time zone NOT NULL,
created_by_user_id character varying(255) COLLATE pg_catalog."default" NOT
NULL,
due_at_dt date,
employee_ind character varying(1) COLLATE pg_catalog."default",
last_updated_at_dttm timestamp without time zone NOT NULL,
last_updated_by_user_id character varying(255) COLLATE pg_catalog."default" NOT
NULL,
le_contact_agency character varying(20) COLLATE pg_catalog."default",
le_contact_date date,
le_contact_ind boolean,
le_contact_name character varying(20) COLLATE pg_catalog."default",
le_contact_phone character varying(20) COLLATE pg_catalog."default",
le_contact_phone_ext character varying(20) COLLATE pg_catalog."default",
report_id character varying(12) COLLATE pg_catalog."default",
review_begin_date date,
review_end_date date,
transaction_aggregate double precision,
version bigint NOT NULL DEFAULT 1,
"_ID_NUMERIC_PART_NO" bigint,
CONSTRAINT "tm_cases_PK" PRIMARY KEY (cases_id),
CONSTRAINT "tm_cases_UC02" UNIQUE ("_ID_NUMERIC_PART_NO")
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE IF EXISTS fdhdata.tm_cases_intern


OWNER to dbmsowner;

GRANT ALL ON TABLE fdhdata.tm_cases_intern TO dbmsowner;

You might also like