feat: create a task model

This commit is contained in:
2024-08-22 22:08:47 +02:00
parent 1b1c849997
commit c4aa093022
8 changed files with 211 additions and 0 deletions

View File

@ -0,0 +1,3 @@
-- This file should undo anything in `up.sql`
DROP TABLE IF EXISTS "tasks";

View File

@ -0,0 +1,11 @@
-- Your SQL goes here
CREATE TABLE "tasks"(
"id" SERIAL NOT NULL PRIMARY KEY,
"title" TEXT NOT NULL,
"deadline" DATE,
"category" JSONB NOT NULL,
"project_id" INT4,
FOREIGN KEY ("project_id") REFERENCES "projects"("id")
);