Romain
07/21/2026, 4:17 PM.uniqueIndex() on a column, but the generated SQL for the migration doesn't remove the index. Am I supposed to remove it manually?Chantal Loncle
07/22/2026, 12:26 AM.uniqueIndex() from a column triggers the expected ALTER/DROP index constraint statement once MigrationUtils.statementsRequiredForDatabaseMigration() is called (or MigrationUtils.generateMigrationScript()).
If this is also what you tried, but no SQL was generated, please share some more details or a reproducer, so I can help troubleshoot.Chantal Loncle
07/22/2026, 12:42 AMRomain
07/22/2026, 12:59 AMMigrationUtils.statementsRequiredForDatabaseMigration and then I use execInBatch, I only did a quick test this morning after my colleague brought it up, but it's very possible that I messed up.Chantal Loncle
07/22/2026, 1:05 AMexecInBatch. So if, in the test, you attempt a validation check directly after, in the same transaction, it may incorrectly show that the index was not removed. If the result is still the same after calling resetCaches(), or if a direct pg_indexes query shows the index is not being removed, then we'll need to look more into this for sure.Romain
07/22/2026, 1:07 AMRomain
07/22/2026, 1:08 AMRomain
07/22/2026, 1:17 AM["ALTER TABLE account ADD is_deleted BOOLEAN DEFAULT FALSE NOT NULL"]
nothing about the new or the old index.Chantal Loncle
07/22/2026, 1:34 AMRomain
07/22/2026, 1:35 AMChantal Loncle
07/22/2026, 1:48 AMRomain
07/22/2026, 2:57 AMChantal Loncle
07/27/2026, 10:21 PMdropStatement() of the table's indexes and run it manually. Then either the migration method or a manual createStatement() should generate the expected SQL, even with the filter condition.Romain
07/27/2026, 10:41 PM