refactor(core): move database schema ownership
This commit is contained in:
@@ -2,12 +2,8 @@
|
||||
|
||||
## Database
|
||||
|
||||
- **Schema**: Drizzle schema lives in `src/**/*.sql.ts`.
|
||||
- **Naming**: tables and columns use snake*case; join columns are `<entity>_id`; indexes are `<table>*<column>\_idx`.
|
||||
- **Migrations**: generated by Drizzle Kit using `drizzle.config.ts` (schema: `./src/**/*.sql.ts`, output: `./migration`).
|
||||
- **Command**: `bun run db generate --name <slug>`.
|
||||
- **Output**: creates `migration/<timestamp>_<slug>/migration.sql` and `snapshot.json`.
|
||||
- **Tests**: migration tests should read the per-folder layout (no `_journal.json`).
|
||||
- **Schema**: Drizzle schema lives in `packages/core/src/**/*.sql.ts`.
|
||||
- **Migrations**: database migrations live in `packages/core` and are applied by core.
|
||||
|
||||
## Development server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user