Closed rogino closed 3 months ago
drizzle-orm
0.31.0
drizzle-kit
0.22.1
The 0.21.0 schema upgrade has broken one of my indexes:
export const entries = makeTable( "entries", { // ... left: timestamp("left"), }, (table) => ({ leftNullIdx: index("entries_left_null_idx") .on(table.left) .where(isNull(table.left)), }) );
Upon upgrading, it deleted the existing index and created a new one:
CREATE INDEX IF NOT EXISTS "entries_left_null_idx" ON "entries" USING btree (left) WHERE "entries"."left" is null;--> statement-breakpoint
However, Postgres tries to interpret left as a keyword instead of the column name, and thus fails.
left
The migration command should quote the column name in USING btree (column_name).
USING btree (column_name)
No response
@rogino I had same error for a column name table. It seems restricted keywords can not be the column names.
Should be fixed in drizzle-kit@0.22.5
drizzle-kit@0.22.5
What version of
drizzle-orm
are you using?0.31.0
What version of
drizzle-kit
are you using?0.22.1
Describe the Bug
The 0.21.0 schema upgrade has broken one of my indexes:
Upon upgrading, it deleted the existing index and created a new one:
However, Postgres tries to interpret
left
as a keyword instead of the column name, and thus fails.Expected behavior
The migration command should quote the column name in
USING btree (column_name)
.Environment & setup
No response