CREATE TABLE account (

id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL

);

CREATE TABLE transaction (

id INTEGER PRIMARY KEY AUTOINCREMENT,
description TEXT NOT NULL,
datetimestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
)

CREATE TABLE journal (
id INTEGER PRIMARY KEY AUTOINCREMENT,
transaction_id INTEGER REFERENCES transaction(id),
account_id INTEGER REFERENCES account(id),
amount REAL NOT NULL,
is_credit BOOLEAN NOT NULL
)
