aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/dawn.sql32
1 files changed, 32 insertions, 0 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 1ee89080..7f0029aa 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -3160,4 +3160,36 @@ CREATE TABLE public.strat_cash_realloc (
"fund" public."fund" NOT NULL DEFAULT 'BOWDST'::fund,
cash_account text NOT NULL,
CONSTRAINT strat_cash_realloc_un UNIQUE (folder, trade_date, amount, currency, fund, cash_account)
+);
+
+CREATE TYPE "instrument_type" AS ENUM (
+ 'IRS',
+ 'CDS',
+ 'BNDO',
+ 'SWPO',
+ 'TRS');
+
+
+CREATE TYPE "id_source" AS ENUM (
+ "RED", "USERID");
+
+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
); \ No newline at end of file