<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

  <!-- что-то важное -->
  <changeSet id="0001" author="Artyom Hackimullin" dbms="postgresql">
    <preConditions onFail="MARK_RAN">
      <tableExists schemaName="total_registered" tableName="age"/>
      <columnExists schemaName="total_registered" tableName="age" columnName="17_yaers_percent"/>
    </preConditions>
    <sql>
        ALTER TABLE total_registered.age RENAME COLUMN "17_yaers_percent" TO "17_years_percent";
    </sql>
  </changeSet>

  <changeSet id="0002" author="Artyom Hackimullin" dbms="postgresql">
    <preConditions onFail="MARK_RAN">
      <tableExists schemaName="total_registered" tableName="age"/>
      <columnExists schemaName="total_registered" tableName="age" columnName="17_yaers"/>
    </preConditions>
    <sql>
        ALTER TABLE total_registered.age RENAME COLUMN "17_yaers" TO "17_years";
    </sql>
  </changeSet>
</databaseChangeLog>