changed 'amount' column to two credit/debit columns

master
Aaron Johnson 4 years ago
parent d897e3db0b
commit e1074c890b

@ -13,7 +13,8 @@ CREATE TABLE balance (
CREATE TABLE transaction ( CREATE TABLE transaction (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
account INT NOT NULL, account INT NOT NULL,
amount NUMERIC(16,2) NOT NULL, withdrawal NUMERIC(16,2),
deposit NUMERIC(16,2),
timestamp TIMESTAMP NOT NULL, timestamp TIMESTAMP NOT NULL,
FOREIGN KEY (account) REFERENCES account (id) FOREIGN KEY (account) REFERENCES account (id)
); );

Loading…
Cancel
Save