aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/dawn.sql27
1 files changed, 17 insertions, 10 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 0415a8c8..96c14999 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -3062,9 +3062,9 @@ CREATE TABLE public.fx_tickets (
CREATE TABLE public.irs (
id int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
dealid text NULL GENERATED ALWAYS AS ('IRS_'::text || id::text) STORED,
- "fund" public."fund" NOT NULL DEFAULT 'SERCGMAST'::fund,
- "portfolio" public."portfolio" NOT NULL,
- folder public."cds_strat" NOT NULL,
+ "fund" "fund" NOT NULL DEFAULT 'SERCGMAST'::fund,
+ "portfolio" "portfolio" NOT NULL,
+ folder "cds_strat" NOT NULL,
cash_account text NOT NULL REFERENCES accounts2(cash_account) ON UPDATE CASCADE,
cp_code varchar(12) NOT NULL,
trade_date date NOT NULL,
@@ -3072,13 +3072,18 @@ CREATE TABLE public.irs (
maturity_date date NOT NULL,
payreceive bool NOT NULL,
fixed_rate float8 NOT NULL,
- fixed_daycount public."day_count" NOT NULL,
- fixed_payment_freq text NOT NULL,
+ fixed_daycount day_count NOT NULL,
+ fixed_payment_freq frequency NOT NULL,
+ fixed_bdc bus_day_convention NOT NULL,
+ fixed_calendar rate_calendar NOT NULL,
notional float8 NOT NULL,
- float_daycount text NOT NULL,
- float_payment_freq text NOT NULL,
- float_index text NOT NULL,
- "currency" text NOT NULL,
+ float_index cash_rate NOT NULL,
+ float_daycount day_count NOT NULL,
+ float_payment_freq frequency NOT NULL,
+ float_bdc bus_day_convention NOT NULL,
+ float_calendar rate_calendar NOT NULL,
+ float_arrears bool NOT NULL,
+ "currency" "currency" NOT NULL,
initial_margin_percentage float8 NULL,
float_fixing_freq text NOT NULL,
pay_interest_calc_method text NOT NULL,
@@ -3096,7 +3101,9 @@ CREATE TYPE "interest_calc_method" AS ENUM (
'Compound',
'Simple');
-
+CREATE TYPE "rate_calendar" AS ENUM (
+ 'P US;R US',
+ 'P US');
CREATE TABLE public.trs (
id int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,