Continue working on tasks feature

This commit is contained in:
Bernd Bestel
2018-09-23 09:22:54 +02:00
parent 6fe0100927
commit f85a67a1ff
17 changed files with 370 additions and 71 deletions

View File

@@ -2,9 +2,9 @@ CREATE TABLE tasks (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
name TEXT NOT NULL UNIQUE,
description TEXT,
due DATETIME,
started TINYINT NOT NULL DEFAULT 0 CHECK(started IN (0, 1)),
due_date DATETIME,
done TINYINT NOT NULL DEFAULT 0 CHECK(done IN (0, 1)),
done_date DATETIME,
category_id INTEGER,
row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime'))
);
@@ -20,5 +20,5 @@ CREATE VIEW tasks_current
AS
SELECT *
FROM tasks
WHERE due IS NULL
OR (due IS NOT NULL AND due > datetime('now', 'localtime'));
WHERE due_date IS NULL
OR (due_date IS NOT NULL AND due_date > datetime('now', 'localtime'));