mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-21 05:59:16 +00:00

- Added a check for DB_FILE_NAME in drizzle.config.ts to ensure it's set. - Updated package.json to change the package name to @kksh/drizzle and added exports for schema and relations. - Enhanced README.md with instructions for using the schema generation. - Refactored schema.ts for improved readability and organization of imports.
14 lines
399 B
Markdown
14 lines
399 B
Markdown
# drizzle
|
|
|
|
- Only use `pull` to generate the schema from existing database.
|
|
- Don't `migrate` or `push`.
|
|
|
|
```bash
|
|
export DB_FILE_NAME="~/Library/Application Support/sh.kunkun.desktop/kk.dev.sqlite"
|
|
bunx drizzle-kit pull
|
|
```
|
|
|
|
We are using sqlite with fts5, which drizzle doesn't support yet, so pushing the schema will destroy the existing schema.
|
|
|
|
We only use pulled schema to generate sql queries.
|