Reorganize project part 3

This commit is contained in:
Bernd Bestel
2018-04-12 21:13:38 +02:00
parent 7dcd39f82f
commit 5a1d21ef31
86 changed files with 625 additions and 583 deletions

12
migrations/0005.sql Normal file
View File

@@ -0,0 +1,12 @@
CREATE TABLE stock_log (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
product_id INTEGER NOT NULL,
amount INTEGER NOT NULL,
best_before_date DATE,
purchased_date DATE,
used_date DATE,
spoiled INTEGER NOT NULL DEFAULT 0,
stock_id TEXT NOT NULL,
transaction_type TEXT NOT NULL,
row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime'))
)