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-kit generate
drizzle-orm
0.33.0
drizzle-kit
0.24.2
Creating an index with an operator results in the wrong migration output.
export const users = pgTable( 'users', { id: uuid('id').primaryKey().defaultRandom(), name: text('name').notNull(), }, (table) => ({ nameIdx: index().using('gin', table.name.op('gin_trgm_ops')), }) )
Using drizzle-kit generate the generated migration file does not include this:
CREATE INDEX IF NOT EXISTS "users_name_index" ON "users" USING gin ("name");
drizzle-kit push seems to not have this issue. because I get not errors there when trying to push my schema with this index.
drizzle-kit push
drizzle-kit generate creates the correct index with option.
CREATE INDEX IF NOT EXISTS "users_name_index" ON "users" USING gin ("name" gin_trgm_ops);
No response
The text was updated successfully, but these errors were encountered:
Maybe this will help. I have a column metadata: jsonb() and I needed to create index for specific field email
metadata: jsonb()
email
idx_metadata_email_trgm: index('idx_metadata_email_trgm').using( 'gin', sql.raw("(metadata->>'email') gin_trgm_ops"), ),
I think you will be able to adapt your syntax using sql.raw(...) syntax
sql.raw(...)
Sorry, something went wrong.
L-Mario564
No branches or pull requests
What version of
drizzle-orm
are you using?0.33.0
What version of
drizzle-kit
are you using?0.24.2
Describe the Bug
Creating an index with an operator results in the wrong migration output.
Using
drizzle-kit generate
the generated migration file does not include this:drizzle-kit push
seems to not have this issue. because I get not errors there when trying to push my schema with this index.Expected behavior
drizzle-kit generate
creates the correct index with option.Environment & setup
No response
The text was updated successfully, but these errors were encountered: