<?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="Nathalie Kaligirwa" id="21050724-add-deleted-at-column-multi-tables">

        <preConditions onFail="WARN">
            <not>
                <columnExists tableName="datasets" columnName="deleted_at"/>
            </not>
        </preConditions>
        <addColumn tableName="datasets">
            <column name = "deleted_at" type="timestamp with timezone" defaultValue = "NULL"/>
        </addColumn>
        <rollback>
            <dropColumn tableName="datasets" columnName="deleted_at" />
        </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="Nathalie Kaligirwa" id="21050724-add-deleted-at-column-multi-tables">

        <preConditions onFail="MARK_RAN">
            <not>
                <columnExists tableName="datasets" columnName="deleted_at"/>
            </not>
        </preConditions>
        <addColumn tableName="datasets">
            <column name = "deleted_at" type="timestamp with timezone" defaultValue = "NULL"/>
        </addColumn>
        <rollback>
            <dropColumn tableName="datasets" columnName="deleted_at" />
        </rollback>
    </changeSet>
</databaseChangeLog>
Mark ran if column exist in migration.
Mark ran if column exist in migration.