@@ -0,0 +1,725 @@
+package uk.gov.migration;%0A%0Aimport org.flywaydb.core.api.migration.MigrationChecksumProvider;%0Aimport org.flywaydb.core.api.migration.jdbc.BaseJdbcMigration;%0A%0Aimport java.sql.Connection;%0Aimport java.sql.Statement;%0A%0Apublic class V__18_ResetSequences extends BaseJdbcMigration implements MigrationChecksumProvider %7B%0A    @Override%0A    public void migrate(Connection connection) throws Exception %7B%0A        Statement stmt = connection.createStatement();%0A%0A        try %7B%0A            stmt.execute(%22SELECT setval('item_item_order_seq', coalesce((select max(blob_order)+1 from item), 1), false)%22);%0A        %7D finally %7B%0A            stmt.close();%0A        %7D%0A    %7D%0A%0A%0A    @Override%0A    public Integer getChecksum() %7B%0A        return 1;%0A    %7D%0A%7D%0A

Reset the blob order sequence to be in sync with the data