2011-02-13 19:30:12 +01:00
|
|
|
CREATE TABLE kisscount(db_version VARCHAR(20));
|
2010-05-14 15:04:01 +02:00
|
|
|
CREATE TABLE user (id INTEGER PRIMARY KEY, name VARCHAR(255), password VARCHAR(255));
|
2010-11-01 11:34:39 +01:00
|
|
|
CREATE TABLE account(id INTEGER PRIMARY KEY, user REFERENCES user(id), name VARCHAR(255), number VARCHAR(255), shared CHAR(1), blocked CHAR(1), default_account CHAR(1));
|
2010-10-24 16:04:56 +02:00
|
|
|
CREATE TABLE shared_account(account REFERENCES account(id), user REFERENCES user(id));
|
2010-05-27 21:09:02 +02:00
|
|
|
CREATE TABLE account_amount(id INTEGER PRIMARY KEY, account REFERENCES account(id), year INTEGER, month INTEGER, amount FLOAT);
|
2010-09-22 21:02:29 +02:00
|
|
|
CREATE TABLE operation(id INTEGER PRIMARY KEY, parent REFERENCES operation(id), user REFERENCES user(id), account REFERENCES account(id), year INTEGER, month INTEGER, day INTEGER, amount FLOAT, description VARCHAR(255), category REFERENCES category(id), fix_cost CHAR(1), checked CHAR(1), formula VARCHAR(255), transfert REFERENCES operation(id), meta CHAR(1));
|
2011-02-13 19:30:12 +01:00
|
|
|
CREATE TABLE category(id INTEGER PRIMARY KEY, user REFERENCES user(id), parent REFERENCES category(id), name VARCHAR(255), backcolor VARCHAR(10), forecolor VARCHAR(10), font VARCHAR(255), fix_cost CHAR(1));
|
2010-07-02 21:40:32 +02:00
|
|
|
CREATE TABLE preference(id INTEGER PRIMARY KEY, user REFERENCES user(id), name VARCHAR(255), value VARCHAR(255));
|
2011-02-13 19:30:12 +01:00
|
|
|
INSERT INTO kisscount ("db_version") VALUES ("2");
|