kunkun/packages/drizzle/drizzle.config.ts
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

16 lines
306 B
TypeScript

import "dotenv/config"
import { defineConfig } from "drizzle-kit"
if (!process.env.DB_FILE_NAME) {
throw new Error("DB_FILE_NAME is not set")
}
export default defineConfig({
out: "./drizzle",
// schema: "./src/db/schema.ts",
dialect: "sqlite",
dbCredentials: {
url: process.env.DB_FILE_NAME
}
})