feat: add base database management

This commit is contained in:
Alexander Navarro 2025-05-07 14:36:26 -04:00
parent 1d5a517395
commit 1e3c235b78
11 changed files with 132 additions and 20 deletions

19
migrations/0003_tasks.sql Normal file
View file

@ -0,0 +1,19 @@
create table tasks
(
id integer not null
constraint tasks_pk
primary key autoincrement,
payload_key ANY not null
constraint tasks_payload_key
unique,
payload TEXT not null,
status_id integer not null
constraint tasks_task_statuses_id_fk
references statuses,
created_at TEXT default CURRENT_TIMESTAMP not null,
updated_at TEXT
);
create unique index tasks_payload_key_uindex
on tasks (payload_key);