You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.3 KiB

2 years ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
  5. <changeSet id="1" author="stian">
  6. <preConditions onFail="MARK_RAN">
  7. <not>
  8. <tableExists tableName="program_step"/>
  9. </not>
  10. </preConditions>
  11. <createTable tableName="program_step">
  12. <column name="id" type="CHAR(10)">
  13. <constraints nullable="false" primaryKey="true"/>
  14. </column>
  15. <column name="step_index" type="INT">
  16. <constraints nullable="false" primaryKey="true"/>
  17. </column>
  18. <column name="duration_type" type="ENUM('Time', 'Distance', 'Calories')">
  19. <constraints nullable="false"/>
  20. </column>
  21. <column name="duration_value" type="INT">
  22. <constraints nullable="false"/>
  23. </column>
  24. </createTable>
  25. </changeSet>
  26. <changeSet id="3" author="stian">
  27. <modifyDataType
  28. tableName="program_step"
  29. columnName="duration_type"
  30. newDataType="ENUM('None', 'Level', 'Time', 'Distance', 'Calories')"
  31. />
  32. </changeSet>
  33. </databaseChangeLog>