diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/dawn.sql | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index 486bbad6..0e6db83c 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -2035,7 +2035,7 @@ CREATE TABLE valuation_reports( endlocalmv float, endlocalmarketprice float, endqty float, - fund fund, + fund fund Not NULL, gfstranid1 text, invccy currency, invdesc text, @@ -2047,7 +2047,7 @@ CREATE TABLE valuation_reports( strat strategy, row integer NOT NULL, counterparty varchar(12) REFERENCES counterparties(code), - PRIMARY KEY(periodenddate, row) + PRIMARY KEY(periodenddate, fund, row) ); CREATE INDEX on valuation_reports (periodenddate); @@ -2055,8 +2055,8 @@ CREATE INDEX on valuation_reports (periodenddate); CREATE TYPE longshort AS ENUM('L', 'S'); CREATE TABLE pnl_reports( - date date, - fund fund, + date date NOT NULL, + fund fund NOT NULL, port portfolio, strat strategy, longshortindicator longshort, @@ -2084,8 +2084,8 @@ CREATE TABLE pnl_reports( mtdbookunrealincome float, mtdbookmiscrevexp float, mtdtotalbookpl float, - row integer, - PRIMARY KEY(date, row) + row integer NOT NULL, + PRIMARY KEY(date, fund, row) ); CREATE INDEX on pnl_reports (date); |
