aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 242aca79..9f7df1f9 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -132,6 +132,7 @@ CREATE TABLE cds(id serial primary key,
isda_definition isda,
termination_date date 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,
index_ref float DEFAULT NULL,
corr_attach float DEFAULT NULL,
@@ -204,7 +205,8 @@ CREATE TABLE swaptions(id serial PRIMARY KEY,
currency currency NOT NULL,
fixed_rate float NOT NULL,
termination_date date,
- termination_amount float);
+ termination_amount float,
+ termination_cp varchar(12) REFERENCES counterparties(code) ON UPDATE CASCADE);
CREATE OR REPLACE FUNCTION auto_dealid()