Greetings and thanks for the great work on this project.
I’m coming back to Liquibase after a long period of absence. I’ve downloaded version 3 and started working to create Liquibase change logs from an existing database.
One of my tables has a nullable column on which I create a unique index.
I used the generateChangeLog command to generate the change logs for my database. The resulting refactoring that the command generated for this index is:
Which when run against a database generates the following SQL:
- CREATE UNIQUE INDEX IX_USER_PERSON_ID ON [dbo].USER
Which is not the same as the original index definition generated by SQL Server Management Studio:
- CREATE UNIQUE NONCLUSTERED INDEX [IX_USER_PERSON_ID] ON [dbo].[USER]
WHERE ([PERSON_ID] IS NOT NULL)
The latter is a conditional index, while the one generated by Liquibase prevents inserting multiple NULL values.
Is there a way to create such a conditional index using createIndex without resorting to using the SQL refactoring?
Thanks and regards,