<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
    <changeSet author="evan" id="20150601-add-column-next-retry">
        <preConditions onFail="MARK_RAN">
            <not>
                <columnExists tableName="secondary_manifest" columnName="next_retry"/>
            </not>
        </preConditions>
        <sql>
            ALTER TABLE secondary_manifest ADD next_retry TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
        </sql>
        <rollback>
            <sql>
                ALTER TABLE secondary_manifest DROP COLUMN next_retry;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
    <changeSet author="evan" id="20150601-add-column-next-retry">
        <preConditions onFail="MARK_RAN">
            <not>
                <columnExists tableName="secondary_manifest" columnName="next_retry"/>
            </not>
        </preConditions>
        <sql>
            ALTER TABLE secondary_manifest ADD next_retry TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
            DROP INDEX IF EXISTS secondary_manifest_next_retry;
            CREATE INDEX secondary_manifest_next_retry ON secondary_manifest(next_retry);
        </sql>
        <rollback>
            <sql>
                ALTER TABLE secondary_manifest DROP COLUMN next_retry;
                DROP INDEX IF EXISTS secondary_manifest_next_retry;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
Add index on next_retry column to help queries...
Add index on next_retry column to help queries...
