Compare commits

..

1 Commits

Author SHA1 Message Date
Dmitriy Pleshevskiy 93d6db2460
repo/sqlite: add base schema 2022-08-17 08:59:45 +03:00
1 changed files with 21 additions and 0 deletions

View File

@ -2,3 +2,24 @@ CREATE TABLE _tas_info (
version INTEGER PRIMARY KEY
);
CREATE TABLE tasks (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
group TEXT NULL,
link TEXT NULL,
path TEXT NULL,
current BOOLEAN NOT NULL DEFAULT false,
created_at DATETIME NOT NULL DEFAULT datetime('now'),
finished_at DATETIME NULL
);
CREATE VIEW active_tasks AS (
SELECT *
FROM tasks
WHERE finished_at IS NULL
ORDER BY created_at
);