feat: 增加项目管理功能
引入 SQLite 数据库(Drizzle ORM + bun:sqlite),实现项目 CRUD 与归档/恢复/删除 生命周期管理,新增项目管理前端页面,migration 嵌入单文件构建产物保持部署体验。 - src/server/db: schema、connection、migration 执行器、项目数据访问层 - src/server/routes/projects: 7 个 API 端点(列表/创建/详情/更新/归档/恢复/删除) - src/web: 项目管理页面(TDesign Table/Tabs/Dialog/Form),TanStack Query hooks - scripts: 构建时嵌入 migration SQL,开发期独立 generate-migrations-data 脚本 - tests: 60 个后端测试 + 27 个前端测试,覆盖 DB/migration/API/路由/页面 - docs: 更新架构、后端、发布、配置、部署、使用文档
This commit is contained in:
16
drizzle/0000_cheerful_switch.sql
Normal file
16
drizzle/0000_cheerful_switch.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE `projects` (
|
||||
`archived_at` text,
|
||||
`created_at` text NOT NULL,
|
||||
`description` text DEFAULT '' NOT NULL,
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`status` text DEFAULT 'active' NOT NULL CHECK (status IN ('active', 'archived')),
|
||||
`updated_at` text NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `projects_name_unique` ON `projects` (`name`);--> statement-breakpoint
|
||||
CREATE TABLE IF NOT EXISTS `schema_migrations` (
|
||||
`applied_at` text NOT NULL,
|
||||
`checksum` text NOT NULL,
|
||||
`id` text PRIMARY KEY NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user