Add account type

This commit is contained in:
2025-04-14 23:25:45 +02:00
parent 342af2c443
commit 5a51dee8b0
16 changed files with 176 additions and 6 deletions

View File

@ -43,6 +43,7 @@ CREATE TABLE accounts
user_id INTEGER NOT NULL REFERENCES users ON DELETE CASCADE,
time_create BIGINT NOT NULL,
time_update BIGINT NOT NULL,
type VARCHAR(1) NOT NULL DEFAULT 'C',
default_account BOOLEAN NOT NULL DEFAULT false
);
@ -52,7 +53,7 @@ CREATE TABLE movements
account_id INTEGER NOT NULL REFERENCES accounts ON DELETE CASCADE,
time BIGINT NOT NULL,
label VARCHAR(200) NOT NULL,
file_id INT REFERENCES files ON DELETE RESTRICT,
file_id INT REFERENCES files ON DELETE RESTRICT,
amount REAL NOT NULL,
checked BOOLEAN NOT NULL DEFAULT false,
time_create BIGINT NOT NULL,