This commit is contained in:
2024-05-14 07:51:19 +02:00
parent fdbe6f8eef
commit 91240711e5
13 changed files with 2325 additions and 66 deletions

View File

@@ -1,11 +1,2 @@
INSERT INTO accounts(
name,
qualifiedName,
description,
type,
balance,
localBalance,
)
VALUES (
'meins', 'Aktiva:meins', 'Mein Geld lol', 'normal', 0.0, 0.0
)
INSERT INTO accounts (name, qualifiedName, description, type, balance, localBalance,)
VALUES ('meins', 'Aktiva:meins', 'Mein Geld lol', 'normal', 0.0, 0.0)

View File

@@ -1,26 +1,25 @@
CREATE TABLE accounts (
account_id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
qualifiedName TEXT NOT NULL,
description TEXT NOT NULL,
type TEXT NOT NULL,
balance FLOAT NOT NULL,
localBalance FLOAT NOT NULL
account_id integer PRIMARY KEY,
name text NOT NULL,
qualifiedName text NOT NULL,
description text NOT NULL,
type TEXT NOT NULL,
balance float NOT NULL,
localBalance float NOT NULL
);
CREATE TABLE transactions (
transaction_id INTEGER PRIMARY KEY,
postingDate TEXT NOT NULL,
valueDate TEXT,
title TEXT NOT NULL
transaction_id integer PRIMARY KEY,
postingDate text NOT NULL,
valueDate text,
title text NOT NULL
);
CREATE TABLE transaction_entries (
transaction_id INT,
account_id INT,
amount FLOAT,
label TEXT,
FOREIGN KEY (transaction_id) REFERENCES transactions(transaction_id)
FOREIGN KEY (account_id) REFERENCES account(account_id)
PRIMARY KEY (transaction_id, account_id)
transaction_id int,
account_id int,
amount float,
label text,
FOREIGN KEY (transaction_id) REFERENCES transactions (transaction_id) FOREIGN KEY (account_id) REFERENCES account (account_id) PRIMARY KEY (transaction_id, account_id)
);