diff options
Diffstat (limited to 'sql/dawn.sql')
| -rw-r--r-- | sql/dawn.sql | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index e16d0a60..5914388e 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -142,6 +142,7 @@ CREATE TABLE cds(id serial primary key, clearing_facility varchar(12) DEFAULT NULL, isda_definition isda, termination_date date DEFAULT NULL, + termination_fee float DEFAULT NULL, termination_amount float DEFAULT NULL, termination_cp varchar(12) DEFAULT NULL REFERENCES counterparties(code) ON UPDATE CASCADE, initial_margin_percentage float DEFAULT NULL, @@ -149,6 +150,8 @@ CREATE TABLE cds(id serial primary key, corr_attach float DEFAULT NULL, corr_detach float DEFAULT NULL, account_code varchar(5) NOT NULL, + cpty_id text, + globeop_id text, CONSTRAINT tranche_check CHECK (( swap_type IN ('CD_INDEX_TRANCHE', 'BESPOKE') AND (orig_attach IS NOT NULL AND orig_detach IS NOT NULL AND clearing_facility IS NULL)) @@ -224,8 +227,11 @@ CREATE TABLE swaptions(id serial PRIMARY KEY, settlement_type settlement_type NOT NULL, fixed_rate float, termination_date date, + termination_fee float, termination_amount float, - termination_cp varchar(12) REFERENCES counterparties(code) ON UPDATE CASCADE); + termination_cp varchar(12) REFERENCES counterparties(code) ON UPDATE CASCADE, + cpty_id text, + globeop_id text); CREATE TRIGGER swaptions_dealid AFTER INSERT ON swaptions FOR EACH ROW EXECUTE PROCEDURE auto_dealid(); @@ -264,9 +270,11 @@ CREATE TABLE capfloors ( reset_lag int4, trade_confirm varchar, termination_date date, + termination_fee float8, termination_amount float8, termination_cp varchar(12) REFERENCES counterparties(code) ON UPDATE CASCADE, cpty_id text, + globeop_id text ) CREATE TRIGGER dealid AFTER INSERT ON capfloors FOR EACH ROW EXECUTE PROCEDURE auto_dealid(); |
