2022-08-16 23:36:50 +03:00
|
|
|
CREATE TABLE _tas_info (
|
|
|
|
version INTEGER PRIMARY KEY
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE tasks (
|
|
|
|
id INTEGER PRIMARY KEY,
|
|
|
|
name TEXT NOT NULL,
|
2022-08-17 10:29:48 +03:00
|
|
|
project TEXT NULL,
|
2022-08-16 23:36:50 +03:00
|
|
|
link TEXT NULL,
|
2022-08-17 10:29:48 +03:00
|
|
|
dir_path TEXT NULL,
|
2022-08-16 23:36:50 +03:00
|
|
|
|
|
|
|
current BOOLEAN NOT NULL DEFAULT false,
|
|
|
|
|
|
|
|
created_at DATETIME NOT NULL DEFAULT datetime('now'),
|
|
|
|
finished_at DATETIME NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE VIEW active_tasks AS (
|
2022-08-17 10:29:48 +03:00
|
|
|
SELECT t.*
|
|
|
|
FROM tasks AS t
|
|
|
|
WHERE t.finished_at IS NULL
|
|
|
|
ORDER BY t.created_at
|
2022-08-16 23:36:50 +03:00
|
|
|
);
|