We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drizzle-orm
0.30.9
drizzle-kit
0.20.17
My config
import { env } from "@/env"; import { defineConfig } from "drizzle-kit"; export default defineConfig({ schema: "./src/db/schema.ts", driver: "turso", out: "./drizzle", dbCredentials: { url: env.DATABASE_URL, authToken: env.DATABASE_AUTH_TOKEN, }, verbose: true, strict: true, });
I had this schema:
export const groups = sqliteTable("group", { id: text("id") .primaryKey() .$defaultFn(() => randomUUID()), name: text("name").notNull(), description: text("description").notNull(), });
generated and migrated fine
then I added this column
userId: text("userId") .notNull() .references(() => users.id, { onDelete: "cascade" }),
which generated this migration
ALTER TABLE group ADD `userId` text NOT NULL REFERENCES user(id);
this script is invalid for sqlite. I had to wrap group with group. Not sure why.
group
No response
The text was updated successfully, but these errors were encountered:
Could be because "group" is a reserved word?
"group"
Sorry, something went wrong.
No branches or pull requests
What version of
drizzle-orm
are you using?0.30.9
What version of
drizzle-kit
are you using?0.20.17
Describe the Bug
My config
I had this schema:
generated and migrated fine
then I added this column
which generated this migration
this script is invalid for sqlite. I had to wrap group with
group
. Not sure why.Expected behavior
No response
Environment & setup
No response
The text was updated successfully, but these errors were encountered: