`drizzle-kit generate:sqlite` doesn't work

lib/drizzle.ts
import { text, blob, sqliteTable } from "drizzle-orm/sqlite-core";

export const Users = sqliteTable("users", {
id: text("id").notNull().primaryKey(),
username: text("username").notNull().unique(),
key: blob("key").notNull(),
salt: blob("salt").notNull()
});
import { text, blob, sqliteTable } from "drizzle-orm/sqlite-core";

export const Users = sqliteTable("users", {
id: text("id").notNull().primaryKey(),
username: text("username").notNull().unique(),
key: blob("key").notNull(),
salt: blob("salt").notNull()
});
drizzle.config.ts
import type { Config } from "drizzle-kit";

export default {
schema: "./lib/drizzle.ts",
out: "./drizzle",
} satisfies Config;
import type { Config } from "drizzle-kit";

export default {
schema: "./lib/drizzle.ts",
out: "./drizzle",
} satisfies Config;
$ drizzle-kit generate:sqlite
drizzle-kit: v0.20.14
drizzle-orm: v0.30.6

No config path provided, using default 'drizzle.config.ts'
Reading config file '/path to my project/drizzle.config.ts'
0 tables


No schema changes, nothing to migrate 😴
drizzle-kit: v0.20.14
drizzle-orm: v0.30.6

No config path provided, using default 'drizzle.config.ts'
Reading config file '/path to my project/drizzle.config.ts'
0 tables


No schema changes, nothing to migrate 😴
I wonder what I am missing?
10 Replies
RequestFX
RequestFX•6mo ago
It says it, no config path provided. A drizzle config is not strictly required. Refer to documentation
RequestFX
RequestFX•6mo ago
Or this video, not SQLite but not relevant for your question https://youtu.be/hIYNOiZXQ7Y
Neon
YouTube
Learn Drizzle ORM in 13 mins (crash course)
Code used in the video: https://github.com/neondatabase/drizzle-overview In this video, you'll learn Drizzle ORM. We'll talk about its different components, how to define your database schema, and its SQL-like querying API as well as its relational API Instructor: https://twitter.com/thisismahmoud_ | https://www.linkedin.com/in/mahmoud-codes/ ...
1girl, best quality
1girl, best quality•6mo ago
It says no config path provided, using default 'drizzle.config.ts' The problem is that, even though I have an export const Users, for some reason it doesn't see it
1girl, best quality
1girl, best quality•6mo ago
I just followed the official bun tutorial https://bun.sh/guides/ecosystem/drizzle and it literally doesn't work
RequestFX
RequestFX•6mo ago
Did you try with providing a path rather than using a config file? Not sure why you would want to use it, you can use scripts to achieve the same Not sure if that's important but I named the table the same as the variable so try lowercase const users
1girl, best quality
1girl, best quality•6mo ago
Yes, I tried explicitly specifying the path to my schema via a command line parameter and changing the variable name to lowercase users; both did not help.
RequestFX
RequestFX•6mo ago
Does it maybe not find the path? Maybe it already generated a schema, on no changes to the schema it will not generate a new patch
1girl, best quality
1girl, best quality•6mo ago
No, it says zero tables.
Startup Spells 🪄 Newsletter Guy
i use drizzle with sqlite. check out if u r doing the same -> https://github.com/deadcoder0904/easypanel-nextjs-sqlite
GitHub
GitHub - deadcoder0904/easypanel-nextjs-sqlite: Next.js + Drizzle +...
Next.js + Drizzle + SQLite + Docker + Litestream (Database Backups) on Easypanel - deadcoder0904/easypanel-nextjs-sqlite
Startup Spells 🪄 Newsletter Guy
note that i did read few weeks/months back that drizzle + bun dont gel well. in any case, you can use node for now until bun gets really stable. give it 6 months or so to hash out bugs & all.
Want results from more Discord servers?
Add your server