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
Reproduction:
import { integer, pgSchema, serial, text, uniqueIndex } from "drizzle-orm/pg-core"; export const mySchema = pgSchema("my_schema"); export const table1 = mySchema.table( "table1", { id: serial("id").primaryKey(), text: text("text").notNull(), }, (table1) => { return { uniqueIdx: uniqueIndex().on(table1.text), }; } ); export const table2 = mySchema.table("table2", { id: serial("id").primaryKey(), fk: integer("fk").references(() => table1.id), });
drizzle-kit generate:pg
ALTER TABLE
CREATE UNIQUE INDEX
table1
table2
Expected behavior All table references in the generated migration include the schema name.
Package versions drizzle-orm: 0.25.3 drizzle-kit: 0.17.6
drizzle-orm
drizzle-kit
The text was updated successfully, but these errors were encountered:
Commenting to track, facing same issue
Duplicate of #18
Sorry, something went wrong.
Fixed in drizzle-kit@0.18.1
drizzle-kit@0.18.1
No branches or pull requests
Reproduction:
drizzle-kit generate:pg
ALTER TABLE
statement for the foreign key and theCREATE UNIQUE INDEX
statement referencetable1
andtable2
without appending the schema name.Expected behavior
All table references in the generated migration include the schema name.
Package versions
drizzle-orm
: 0.25.3drizzle-kit
: 0.17.6The text was updated successfully, but these errors were encountered: