docs: 同步 AGENTS.md — 单 owner 模型 + 强制 migration workflow + CLI 文档
This commit is contained in:
@@ -41,12 +41,14 @@ bun run compile # Compile server to standalone binary
|
||||
bun run fix # Lint + format (Biome auto-fix)
|
||||
bun run typecheck # TypeScript check across monorepo
|
||||
|
||||
# Database (in apps/server)
|
||||
bun run db:generate # Generate migrations from schema
|
||||
bun run db:migrate # Run migrations
|
||||
bun run db:push # Push schema (dev only)
|
||||
# Database (in apps/server) — ALWAYS use migration workflow, never db:push
|
||||
bun run db:generate # Generate migrations from schema changes
|
||||
bun run db:migrate # Run pending migrations
|
||||
bun run db:studio # Open Drizzle Studio
|
||||
|
||||
# Server CLI (in apps/server)
|
||||
bun run cli auth reset-password # Reset owner password
|
||||
|
||||
# Testing (not yet configured)
|
||||
bun test path/to/test.ts # Run single test file
|
||||
```
|
||||
@@ -93,6 +95,7 @@ Biome auto-organizes. Order: 1) External packages → 2) Internal `@/*` aliases
|
||||
- **Validation**: `drizzle-orm/zod` (built-in, NOT separate `drizzle-zod` package)
|
||||
- **Relations**: Defined via `defineRelations()` — RQBv2 object syntax
|
||||
- **Query style**: `db.query.tableName.findMany({ orderBy: { createdAt: 'desc' }, where: { id: 1 } })`
|
||||
- **Migration workflow**: Always `db:generate` → `db:migrate`. **Never** use `db:push`.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
|
||||
Reference in New Issue
Block a user