aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index c9d374c6..088f71b5 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -310,6 +310,7 @@ CREATE TABLE cds(id serial primary key,
traded_level numeric(9, 5) NULL,
exercised_from text REFERENCES swaptions(dealid),
delta_id integer REFERENCES cds(id),
+ delta_alloc float,
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))
@@ -497,6 +498,7 @@ CREATE TABLE swaptions(id serial PRIMARY KEY,
globeop_id int,
full_globeop_id text GENERATED ALWAYS AS ('SWO'||lpad(cast(globeop_id as text), 6, '0')|| 'K00SCLMA') STORED,
delta_id int REFERENCES cds(id),
+ delta_alloc float
);
CREATE TRIGGER swaptions_dealid BEFORE INSERT ON swaptions