I should be working.
This commit is contained in:
1 parent
d262f0d2f8
commit
d78b4f1d90
5 files changed
+55
-45
No files matched your search
@@ -53,13 +53,11 @@ CREATE TABLE IF NOT EXISTS accounts
|
||||
security INTEGER NOT NULL,
|
||||
account_type TEXT NOT NULL,
|
||||
|
||||
owner INTEGER NOT NULL, -- todo: remove
|
||||
amount INTEGER NOT NULL,
|
||||
timestamp DATETIME NOT NULL,
|
||||
creation_time DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
FOREIGN KEY (security) REFERENCES securities (id),
|
||||
FOREIGN KEY (owner) REFERENCES users (id),
|
||||
FOREIGN KEY (account_type) REFERENCES account_types (name)
|
||||
);
|
||||
|
||||
@@ -70,7 +68,7 @@ CREATE TABLE IF NOT EXISTS account_user_permissions
|
||||
user_id INTEGER NOT NULL,
|
||||
creation_time DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES account (id),
|
||||
FOREIGN KEY (account_id) REFERENCES accounts (id),
|
||||
FOREIGN KEY (user_id) REFERENCES users (id)
|
||||
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user