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
I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm are you using?
0.37.0
What version of drizzle-kit are you using?
0.29.1
Other packages
No response
Describe the Bug
When removing a previously created index on the schema definition (it's important that this is done on a definition with a prefix other than the default "public") and generating a migration using drizzle-kit, the generated SQL does not include the pg schema prefix for the tables. This results in a not found index and then a not-deleted/dropped index which can lead to unwanted or broken behaviour.
A sample generated SQL (even if the db schema prefix is something like "db2") would be: DROP INDEX IF EXISTS "table_vaue_1_value_2_index";--> statement-breakpoint
and should be: DROP INDEX IF EXISTS "db2"."table_vaue_1_value_2_index";--> statement-breakpoint
The first version will never find the corresponding index and the migration will falsely run through due to the IF EXISTS.
The text was updated successfully, but these errors were encountered:
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.37.0
What version of
drizzle-kit
are you using?0.29.1
Other packages
No response
Describe the Bug
When removing a previously created index on the schema definition (it's important that this is done on a definition with a prefix other than the default "public") and generating a migration using drizzle-kit, the generated SQL does not include the pg schema prefix for the tables. This results in a not found index and then a not-deleted/dropped index which can lead to unwanted or broken behaviour.
A sample generated SQL (even if the db schema prefix is something like "db2") would be:
DROP INDEX IF EXISTS "table_vaue_1_value_2_index";--> statement-breakpoint
and should be:
DROP INDEX IF EXISTS "db2"."table_vaue_1_value_2_index";--> statement-breakpoint
The first version will never find the corresponding index and the migration will falsely run through due to the
IF EXISTS
.The text was updated successfully, but these errors were encountered: