Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: task and subtask #338

Closed
wants to merge 11 commits into from
26 changes: 26 additions & 0 deletions migrations/0001_wandering_ogun.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CREATE TABLE `noodle_subtask` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`title` text NOT NULL,
`notes` text NOT NULL,
`done` integer DEFAULT false,
`doneAt` text,
`task_id` integer NOT NULL,
`createdAt` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`updatedAt` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
FOREIGN KEY (`task_id`) REFERENCES `noodle_task`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
CREATE TABLE `noodle_task` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`title` text NOT NULL,
`notes` text NOT NULL,
`done` integer DEFAULT false,
`doneAt` text,
`dueDate` text NOT NULL,
`priority` text NOT NULL,
`tags` text,
`module_id` integer NOT NULL,
`createdAt` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`updatedAt` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
FOREIGN KEY (`module_id`) REFERENCES `noodle_module`(`id`) ON UPDATE no action ON DELETE no action
);