aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql34
1 files changed, 0 insertions, 34 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 0b1f2619..79d811e4 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -150,40 +150,6 @@ CREATE TABLE bonds(id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
stale bool NOT NULL DEFAULT true,
CONSTRAINT bonds_check CHECK (cusip IS NOT NULL OR isin IS NOT NULL));
-CREATE TABLE public.repos (
- id serial NOT NULL,
- dealid varchar(28) NULL,
- "fund" fund NOT NULL,
- lastupdate timestamptz NULL DEFAULT now(),
- "action" action NULL,
- folder bond_strat NOT NULL,
- custodian varchar(12) NOT NULL,
- cashaccount varchar(12) NOT NULL,
- cp_code varchar(12) NOT NULL,
- trade_date date NOT NULL,
- settle_date date NOT NULL,
- cusip varchar(9) NULL,
- isin varchar(12) NULL,
- identifier varchar(12) NULL,
- description varchar(32) NOT NULL,
- transaction_indicator repo_type NULL,
- faceamount float8 NOT NULL,
- price float8 NOT NULL,
- "currency" currency NOT NULL DEFAULT 'USD'::currency,
- expiration_date date NULL,
- weighted_amount float8 NULL,
- haircut float8 NULL,
- repo_rate float8 NOT NULL,
- "call_notice" call_notice NULL,
- daycount day_count NULL,
- ticket varchar NULL,
- CONSTRAINT repos_pkey PRIMARY KEY (id),
- CONSTRAINT repos_cp_code_fkey FOREIGN KEY (cp_code) REFERENCES public.counterparties(code)
-);
-
-CREATE TRIGGER repos AFTER INSERT ON
-public.repos FOR EACH ROW EXECUTE FUNCTION auto_dealid();
-
CREATE OR REPLACE FUNCTION notify_id()
RETURNS trigger