feat: require owner login and add onboarding

This commit is contained in:
2026-09-28 19:14:14 +09:00
parent 57882cf5f9
commit 85d23a328b
42 changed files with 2400 additions and 23 deletions
+23
View File
@@ -0,0 +1,23 @@
CREATE TABLE `auth_sessions` (
`token_hash` text PRIMARY KEY NOT NULL,
`owner_id` integer NOT NULL,
`expires_at` integer NOT NULL,
FOREIGN KEY (`owner_id`) REFERENCES `workspace_owner`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE TABLE `auth_throttle` (
`id` integer PRIMARY KEY NOT NULL,
`attempts` integer NOT NULL,
`reset_at` integer NOT NULL,
CONSTRAINT "auth_throttle_singleton" CHECK("auth_throttle"."id" = 1)
);
--> statement-breakpoint
CREATE TABLE `workspace_owner` (
`id` integer PRIMARY KEY NOT NULL,
`email` text NOT NULL,
`name` text NOT NULL,
`password_hash` text NOT NULL,
`onboarding_completed_at` integer,
`created_at` integer NOT NULL,
CONSTRAINT "workspace_owner_singleton" CHECK("workspace_owner"."id" = 1)
);