github repo creation flow

This commit is contained in:
Will Chen
2025-04-14 21:55:51 -07:00
parent 7ad83a2bdc
commit 05a97d31c4
12 changed files with 288 additions and 10 deletions

View File

@@ -0,0 +1,26 @@
CREATE TABLE `apps` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`name` text NOT NULL,
`path` text NOT NULL,
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
`updated_at` integer DEFAULT (unixepoch()) NOT NULL,
`github_org` text,
`github_repo` text
);
--> statement-breakpoint
CREATE TABLE `chats` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`app_id` integer NOT NULL,
`title` text,
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
FOREIGN KEY (`app_id`) REFERENCES `apps`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE TABLE `messages` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`chat_id` integer NOT NULL,
`role` text NOT NULL,
`content` text NOT NULL,
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
FOREIGN KEY (`chat_id`) REFERENCES `chats`(`id`) ON UPDATE no action ON DELETE cascade
);