Skip to content

Commit

Permalink
feat: ✨ finishing socket communication for tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
aacevski committed Jan 26, 2025
1 parent 6f2c90b commit dcb8475
Show file tree
Hide file tree
Showing 69 changed files with 897 additions and 878 deletions.
2 changes: 1 addition & 1 deletion apps/api/drizzle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export default defineConfig({
schema: "./src/database/schema.ts",
dialect: "sqlite",
dbCredentials: {
url: "file:local.db",
url: "file:kaneo.db",
},
}) satisfies Config;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CREATE TABLE `project` (
`workspace_id` text NOT NULL,
`name` text NOT NULL,
`description` text,
`created_at` integer DEFAULT '"2025-01-18T14:59:51.091Z"' NOT NULL,
`created_at` integer DEFAULT '"2025-01-25T23:50:45.754Z"' NOT NULL,
FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE cascade ON DELETE cascade
);
--> statement-breakpoint
Expand All @@ -21,8 +21,9 @@ CREATE TABLE `task` (
`title` text NOT NULL,
`description` text,
`status` text DEFAULT 'to-do' NOT NULL,
`priority` text DEFAULT 'low',
`due_date` integer,
`created_at` integer DEFAULT '"2025-01-18T14:59:51.091Z"' NOT NULL,
`created_at` integer DEFAULT '"2025-01-25T23:50:45.754Z"' NOT NULL,
FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON UPDATE cascade ON DELETE cascade,
FOREIGN KEY (`assignee_id`) REFERENCES `user`(`id`) ON UPDATE cascade ON DELETE cascade
);
Expand All @@ -32,7 +33,7 @@ CREATE TABLE `user` (
`name` text NOT NULL,
`password` text NOT NULL,
`email` text NOT NULL,
`created_at` integer DEFAULT '"2025-01-18T14:59:51.090Z"' NOT NULL
`created_at` integer DEFAULT '"2025-01-25T23:50:45.753Z"' NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `user_email_unique` ON `user` (`email`);--> statement-breakpoint
Expand All @@ -41,7 +42,7 @@ CREATE TABLE `workspace` (
`name` text NOT NULL,
`description` text,
`owner_id` text NOT NULL,
`created_at` integer DEFAULT '"2025-01-18T14:59:51.091Z"' NOT NULL,
`created_at` integer DEFAULT '"2025-01-25T23:50:45.754Z"' NOT NULL,
FOREIGN KEY (`owner_id`) REFERENCES `user`(`id`) ON UPDATE cascade ON DELETE cascade
);
--> statement-breakpoint
Expand All @@ -50,7 +51,7 @@ CREATE TABLE `workspace_member` (
`workspace_id` text NOT NULL,
`user_id` text NOT NULL,
`role` text,
`joined_at` integer DEFAULT '"2025-01-18T14:59:51.091Z"' NOT NULL,
`joined_at` integer DEFAULT '"2025-01-25T23:50:45.754Z"' NOT NULL,
FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE cascade ON DELETE cascade,
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE cascade ON DELETE cascade
);
67 changes: 0 additions & 67 deletions apps/api/drizzle/0001_mean_ultimo.sql

This file was deleted.

20 changes: 14 additions & 6 deletions apps/api/drizzle/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "6",
"dialect": "sqlite",
"id": "c0af92e1-37ce-46b9-bd70-337eb6049763",
"id": "0bc2ad49-3384-4972-89cf-56af7f84a77f",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"project": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'\"2025-01-18T14:59:51.091Z\"'"
"default": "'\"2025-01-25T23:50:45.754Z\"'"
}
},
"indexes": {},
Expand Down Expand Up @@ -147,6 +147,14 @@
"autoincrement": false,
"default": "'to-do'"
},
"priority": {
"name": "priority",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "'low'"
},
"due_date": {
"name": "due_date",
"type": "integer",
Expand All @@ -160,7 +168,7 @@
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'\"2025-01-18T14:59:51.091Z\"'"
"default": "'\"2025-01-25T23:50:45.754Z\"'"
}
},
"indexes": {},
Expand Down Expand Up @@ -225,7 +233,7 @@
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'\"2025-01-18T14:59:51.090Z\"'"
"default": "'\"2025-01-25T23:50:45.753Z\"'"
}
},
"indexes": {
Expand Down Expand Up @@ -277,7 +285,7 @@
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'\"2025-01-18T14:59:51.091Z\"'"
"default": "'\"2025-01-25T23:50:45.754Z\"'"
}
},
"indexes": {},
Expand Down Expand Up @@ -333,7 +341,7 @@
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'\"2025-01-18T14:59:51.091Z\"'"
"default": "'\"2025-01-25T23:50:45.754Z\"'"
}
},
"indexes": {},
Expand Down
Loading

0 comments on commit dcb8475

Please sign in to comment.