diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/dawn.sql | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index de38b3a4..b94a295d 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -17,6 +17,7 @@ CREATE type bus_day_convention AS ENUM('Modified Following', 'Following', 'Modif CREATE type index_type AS ENUM('IG', 'HY', 'EU', 'XO', 'LCDX'); CREATE TYPE swap_type AS ENUM('CD_INDEX', 'CD_INDEX_TRANCHE', 'CD_BASKET_TRANCHE', 'ABS_CDS'); CREATE type isda AS ENUM('ISDA2014', 'ISDA2003Cred'); +CREATE type protection AS ENUM('Buyer', 'Seller'); CREATE TABLE counterparties(code varchar(12) primary key, name text, @@ -62,7 +63,7 @@ CREATE TABLE bonds(id serial primary key, principal_payment float, accrued_payment float); -CREATE TABLE cds(is serial primary key, +CREATE TABLE cds(id serial primary key, dealid varchar(28), lastupdate timestamp, action action, @@ -78,7 +79,7 @@ CREATE TABLE cds(is serial primary key, notional float, fixed_rate float, day_count day_count, - frequency samllint, + frequency smallint, protection protection, security_id varchar(12), security_desc varchar(32), @@ -90,8 +91,6 @@ CREATE TABLE cds(is serial primary key, clearing_facility varchar(12), isda_definition isda); - - CREATE TABLE securities(identifier varchar(12) PRIMARY KEY, cusip varchar(9), isin varchar(12), |
