kunkun/packages/drizzle/README.md
Huakun Shen 5fb13e75b3
feat: update drizzle configuration and schema management
- 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.
2025-03-21 08:05:29 -04:00

399 B

drizzle

  • Only use pull to generate the schema from existing database.
  • Don't migrate or push.
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.