diff options
| -rw-r--r-- | sql/dawn.sql | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index 482826af..f74c1dfb 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -3177,27 +3177,6 @@ CREATE TYPE "serenitas_product" AS ENUM( 'tranche', 'cdx_swaption', 'ir_swaption', 'irs', 'trs' ) -CREATE TABLE public.citco_instruments ( - id int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - dealid text NULL GENERATED ALWAYS AS ('GIL'::text || id::text) STORED, - serenitas_product "serenitas_product" NOT NULL, - instrument_type "instrument_type" NOT NULL, - underlying_id_source "id_source" NOT NULL, - underlying_security_id text NOT NULL, - birth_date date NULL, - death_date date NULL, - active bool NULL, - attach int8 NULL, - detach int8 NULL, - strike float NULL, - expiration date NULL, - callput bool NULL, - commited bool NOT NULL default False, - CONSTRAINT swaption UNIQUE (expiration, strike, underlying_security_id, serenitas_product, callput), - CONSTRAINT tranche UNIQUE (serenitas_product, underlying_security_id, attach, detach) -); - - CREATE TABLE public.citco_tranche ( id int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY, dealid text NULL GENERATED ALWAYS AS ('CDS_'::text || id::text) STORED, @@ -3289,4 +3268,11 @@ CREATE TABLE public.citco_trs ( compound_avg_frequency public."frequency" NOT NULL, fixing_frequency public."frequency" NOT NULL, commited bool NOT NULL default False +); + + +CREATE TABLE public.citco_mapping ( + "enum" text NOT NULL, + "mapping" text NOT NULL, + CONSTRAINT citco_mapping_un UNIQUE (enum, mapping) );
\ No newline at end of file |
