aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/serenitasdb.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/serenitasdb.sql b/sql/serenitasdb.sql
index ca45551c..810d9a4d 100644
--- a/sql/serenitasdb.sql
+++ b/sql/serenitasdb.sql
@@ -285,7 +285,7 @@ CREATE TABLE CDS_Issuers_old(
GRANT ALL ON CDS_Issuers_old to serenitas_user;
-CREATE TYPE cds_issuers AS
+CREATE TYPE cds_issuers AS (
Name text,
company_id integer,
ticker text,
@@ -873,7 +873,7 @@ CREATE TABLE swaption_lognormal_vol(
CREATE TABLE swaption_quotes(
quote_id SERIAL PRIMARY KEY,
- ref_id integer REFERENCES swaption_ref_quotes,
+ ref_id integer REFERENCES swaption_ref_quotes ON DELETE CASCADE,
strike float,
delta_pay float,
delta_rec float,
@@ -905,7 +905,7 @@ CREATE INDEX ON swaption_ref_quotes (quotedate, index, series);
ALTER TABLE swaption_ref_quotes ADD UNIQUE(quotedate, index, series, expiry);
CREATE TABLE swaption_calib(
- quote_id integer PRIMARY KEY REFERENCES swaption_quotes,
+ quote_id integer PRIMARY KEY REFERENCES swaption_quotes ON DELETE CASCADE,
vol_payer float,
vol_receiver float,
vol_payer_black float,