starting transaction
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
CREATE TABLE accounts (
|
||||
account_id integer PRIMARY KEY,
|
||||
number integer NOT NULL,
|
||||
name text NOT NULL,
|
||||
qualifiedName text NOT NULL,
|
||||
qualifiedName text NOT NULL UNIQUE,
|
||||
description text NOT NULL,
|
||||
type TEXT NOT NULL,
|
||||
balance float NOT NULL,
|
||||
@@ -17,9 +17,9 @@ CREATE TABLE transactions (
|
||||
|
||||
CREATE TABLE transaction_entries (
|
||||
transaction_id int,
|
||||
account_id int,
|
||||
account_name text NOT NULL,
|
||||
amount float,
|
||||
label text,
|
||||
FOREIGN KEY (transaction_id) REFERENCES transactions (transaction_id) FOREIGN KEY (account_id) REFERENCES account (account_id) PRIMARY KEY (transaction_id, account_id)
|
||||
FOREIGN KEY (transaction_id) REFERENCES transactions (transaction_id) FOREIGN KEY (account_name) REFERENCES account (account_qualifiedName) PRIMARY KEY (transaction_id, account_id)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user