chore: initial commit of HouseholdBudgetBook (backend, frontend, desktop)
This commit is contained in:
commit
4a5db3f1f9
167 files changed
+21732
No files matched your search
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE IF NOT EXISTS policy_payments (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
policy_id INTEGER NOT NULL REFERENCES policies(id) ON DELETE CASCADE,
|
||||
due_date TEXT NOT NULL,
|
||||
amount INTEGER NOT NULL DEFAULT 0 CHECK (amount >= 0),
|
||||
status TEXT NOT NULL DEFAULT 'pending' CHECK (status IN ('pending','paid','skipped')),
|
||||
paid_date TEXT NOT NULL DEFAULT '',
|
||||
note TEXT NOT NULL DEFAULT '',
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_policy_payments_policy_due ON policy_payments(policy_id, due_date);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS account_reconciliations (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
account_id INTEGER NOT NULL REFERENCES accounts(id) ON DELETE CASCADE,
|
||||
system_balance INTEGER NOT NULL,
|
||||
actual_balance INTEGER NOT NULL,
|
||||
difference INTEGER NOT NULL,
|
||||
transaction_id INTEGER REFERENCES transactions(id) ON DELETE SET NULL,
|
||||
note TEXT NOT NULL DEFAULT '',
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_account_reconciliations_account ON account_reconciliations(account_id, created_at);
|
||||
Reference in new issue
Block a user