We can now create securities in the UI!!!!
This commit is contained in:
1 parent
048ac31c27
commit
4810603dd7
10 files changed
+147
-23
No files matched your search
@@ -106,6 +106,24 @@ CREATE TABLE IF NOT EXISTS cashed_cheques
|
||||
CONSTRAINT double_spending UNIQUE (drawer_user_id, cheque_number) -- no double spending
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS cached_wire_transfers
|
||||
(
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
drawer_account_id INTEGER NOT NULL,
|
||||
drawer_account_version INTEGER NOT NULL,
|
||||
wire_transfer_request_number INTEGER NOT NULL,
|
||||
amount INTEGER NOT NULL,
|
||||
underlying_security INTEGER NOT NULL,
|
||||
payee_account_id INTEGER NOT NULL,
|
||||
payee_account_version INTEGER NOT NULL,
|
||||
creation_time DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
FOREIGN KEY (underlying_security) REFERENCES securities (id),
|
||||
FOREIGN KEY (drawer_account_id) REFERENCES accounts (id),
|
||||
FOREIGN KEY (payee_account_id) REFERENCES accounts (id),
|
||||
CONSTRAINT double_spending UNIQUE (drawer_account_id, wire_transfer_request_number) -- no double spending
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS event_processing_statuses
|
||||
(
|
||||
value TEXT PRIMARY KEY
|
||||
@@ -119,11 +137,11 @@ VALUES ('processing'),
|
||||
|
||||
CREATE TABLE IF NOT EXISTS event_processing_log
|
||||
(
|
||||
id TEXT PRIMARY KEY,
|
||||
event JSON,
|
||||
status TEXT NOT NULL,
|
||||
received_time DATETIME NOT NULL,
|
||||
id TEXT PRIMARY KEY,
|
||||
event JSON,
|
||||
status TEXT NOT NULL,
|
||||
received_time DATETIME NOT NULL,
|
||||
completed_time DATETIME,
|
||||
error_message TEXT NOT NULL DEFAULT '',
|
||||
error_message TEXT NOT NULL DEFAULT '',
|
||||
FOREIGN KEY (status) REFERENCES event_processing_statuses (value)
|
||||
)
|
||||
Reference in new issue
Block a user