You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,20 @@ This file provides guidance to coding agents when working with code in this repo
19
19
-`pnpm run db:migrate:latest` - Apply latest migrations
20
20
-`pnpm run db:migrate:reset` - Drop schema and rerun migrations
21
21
-`pnpm run db:seed:import` - Import seed data for local development
22
-
-`pnpm run db:migrate:make` - Generate new migration based on entity changes
23
-
-`pnpm run db:migrate:create` - Create empty migration file
22
+
-`pnpm run db:migrate:make src/migration/MigrationName` - Generate new migration based on entity changes
23
+
-`pnpm run db:migrate:create src/migration/MigrationName` - Create empty migration file
24
+
25
+
**Migration Generation:**
26
+
When adding or modifying entity columns, **always generate a migration** using:
27
+
```bash
28
+
# IMPORTANT: Run nvm use from within daily-api directory (uses .nvmrc with node 22.16)
29
+
cd /path/to/daily-api
30
+
nvm use
31
+
pnpm run db:migrate:make src/migration/DescriptiveMigrationName
32
+
```
33
+
The migration generator compares entities against the local database schema. Ensure your local DB is up to date with `pnpm run db:migrate:latest` before generating new migrations.
34
+
35
+
**IMPORTANT: Review generated migrations for schema drift.** The generator may include unrelated changes from local schema differences. Always review and clean up migrations to include only the intended changes.
24
36
25
37
**Building & Testing:**
26
38
-`pnpm run build` - Compile TypeScript to build directory
0 commit comments