mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-20 21:49: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.
16 lines
306 B
TypeScript
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
|
|
}
|
|
})
|