]> git.sesse.net Git - autoeconomy/blob - autoeconomy.sql
Initial checkin for move to Git (no prior version history available).
[autoeconomy] / autoeconomy.sql
1 CREATE TABLE transaction (
2         account varchar not null,
3         accounting_date date not null,
4         interest_date date not null,
5         use_date date not null,
6         reference varchar primary key not null,
7         trans_type varchar not null,
8         text varchar not null,
9         amount_out numeric(9,2),
10         amount_in numeric(9,2),
11
12         CHECK ((amount_in IS NULL) <> (amount_out IS NULL))
13 );