Open
Description
Report hasn't been filed before.
- 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.44.2
What version of drizzle-kit
are you using?
0.31.3
Other packages
No response
Describe the Bug
What is the undesired behavior?
It is on CloudFlare D1 database. I have a database table that has already been pushed a table with an unique partial index. When I try to do push
another time with exact table schema untouched, drizzle-kit
would remind the following instead of telling me "No changes detected":
DROP INDEX `idx`;
CREATE UNIQUE INDEX `idx` ON `table` (`id`,`type`) WHERE "table"."isDeleted" is null;
What are the steps to reproduce it?
- Using
push
command ofdrizzle-kit
- Push a table with partial index(
where
clause after index) - Do
push
another time with schema untouched - You will see in the CLI telling you it would drop the index created in step.2 and create a same new one.
What is the desired result?
drizzle-kit
should tell me "No changes detected". To be more specific, the internal schema introspection of drizzle-kit
should recognize Partial Index
and its conditional columns.
What database engine are you using? Are you using a specific cloud provider? Which one?
I am using drizzle-kit
on D1 database of CloudFlare with following config:
export default defineConfig({
out: './migrations',
schema: './schema/index.ts',
dialect: 'sqlite',
driver: 'd1-http',
dbCredentials: {
// ...
},
})