feat: initial commit with accounts manager project structure
- TypeScript项目基础架构 - API路由和账户管理服务 - 数据库模式和迁移 - 基础配置文件和文档 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
16
drizzle/0000_wet_joshua_kane.sql
Normal file
16
drizzle/0000_wet_joshua_kane.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE IF NOT EXISTS "accounts" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"owner_id" varchar(128) NOT NULL,
|
||||
"platform" varchar(100) NOT NULL,
|
||||
"custom_id" varchar(255) NOT NULL,
|
||||
"data" text NOT NULL,
|
||||
"status" varchar(50) NOT NULL,
|
||||
"notes" text,
|
||||
"locked_at" timestamp,
|
||||
"created_at" timestamp DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "platform_custom_id_idx" ON "accounts" USING btree ("platform","custom_id");--> statement-breakpoint
|
||||
CREATE INDEX IF NOT EXISTS "owner_id_status_idx" ON "accounts" USING btree ("owner_id","status");--> statement-breakpoint
|
||||
CREATE INDEX IF NOT EXISTS "platform_owner_idx" ON "accounts" USING btree ("platform","owner_id");
|
||||
Reference in New Issue
Block a user