feat: create a task model
This commit is contained in:
3
migrations/2024-08-19-105140_create_tasks/down.sql
Normal file
3
migrations/2024-08-19-105140_create_tasks/down.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
|
||||
DROP TABLE IF EXISTS "tasks";
|
11
migrations/2024-08-19-105140_create_tasks/up.sql
Normal file
11
migrations/2024-08-19-105140_create_tasks/up.sql
Normal 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")
|
||||
);
|
||||
|
Reference in New Issue
Block a user