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

<?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-3.1.xsd">
<changeSet id="1" author="stian">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="program_step"/>
</not>
</preConditions>
<createTable tableName="program_step">
<column name="id" type="CHAR(10)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="step_index" type="INT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="duration_type" type="ENUM('Time', 'Distance', 'Calories')">
<constraints nullable="false"/>
</column>
<column name="duration_value" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet id="3" author="stian">
<modifyDataType
tableName="program_step"
columnName="duration_type"
newDataType="ENUM('None', 'Level', 'Time', 'Distance', 'Calories')"
/>
</changeSet>
</databaseChangeLog>