You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATEINDEXIF NOT EXISTS "locations_open_orders_index"ON"orders" USING btree (location_id,started_at DESC NULLS LAST) WHERE"orders"."open"= $1;--> statement-breakpoint
Which causes the migration to fail with:
applying migrations...error: there is no parameter $1
The docs say to use
// First example, with `.on()`index('name').on(table.column1.asc(),table.column2.nullsFirst(), ...)or.onOnly(table.column1.desc().nullsLast(),table.column2, ...).concurrently().where(sql``).with({fillfactor: '70'})
With the sql builder instead of the helper functions, and I'm about to use that instead, but there is no reason to suspect the helper functions wouldnt work here.
Expected behavior
In the migration file it would generate
CREATEINDEXIF NOT EXISTS "locations_open_orders_index"ON"orders" USING btree (location_id,started_at DESC NULLS LAST) WHERE"orders"."open"= true;
Environment & setup
No response
The text was updated successfully, but these errors were encountered:
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
Creating an index with a where condition
Creates in the migration file:
Which causes the migration to fail with:
The docs say to use
With the sql builder instead of the helper functions, and I'm about to use that instead, but there is no reason to suspect the helper functions wouldnt work here.
Expected behavior
In the migration file it would generate
Environment & setup
No response
The text was updated successfully, but these errors were encountered: