Create Initial Database Schema for Tasks. (#1)

Create migration scripts for this and initial Task DB Model in rust along with unit tests.

Reviewed-on: #1
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-08-24 17:10:31 +00:00 committed by Drew
parent c2b7c12905
commit 82d524a62f
13 changed files with 1923 additions and 15 deletions

View file

@ -0,0 +1,10 @@
-- Add up migration script here
CREATE TABLE tasks (
id UUID PRIMARY KEY NOT NULL,
title VARCHAR NOT NULL,
description TEXT,
status TEXT CHECK(status IN ('todo', 'done', 'backlog')) DEFAULT 'todo',
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
completed_at TIMESTAMP
);