diff options
author | cel 🌸 <cel@blos.sm> | 2024-08-04 18:26:38 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2024-08-04 18:26:38 +0100 |
commit | c3fde18b74fa967a02b3a922a9a3554b80207b06 (patch) | |
tree | e2d822189e97c8600b5113490e6dc921f3398561 /migrations | |
download | fj-c3fde18b74fa967a02b3a922a9a3554b80207b06.tar.gz fj-c3fde18b74fa967a02b3a922a9a3554b80207b06.tar.bz2 fj-c3fde18b74fa967a02b3a922a9a3554b80207b06.zip |
WIP: db
Diffstat (limited to '')
-rw-r--r-- | migrations/20240726140649_fj.sql | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/migrations/20240726140649_fj.sql b/migrations/20240726140649_fj.sql new file mode 100644 index 0000000..0afed32 --- /dev/null +++ b/migrations/20240726140649_fj.sql @@ -0,0 +1,35 @@ +PRAGMA foreign_keys = on; + +create table tasks ( + id integer primary key, + name text unique not null, + cron text, + archived integer not null default 0, + description text +); + +create table categories ( + id integer primary key, + name text unique not null +); + +create table tasks_categories ( + task_id integer, + category_id integer, + foreign key(task_id) references tasks(id), + foreign key(category_id) references categories(id) +); + +create table log ( + id integer primary key, + task_id integer, + datetime text not null, + foreign key(task_id) references tasks(id) +); + +create table reminders ( + id integer primary key, + task_id integer, + time_delta text not null, + foreign key(task_id) references tasks(id) +); |