Support for custom ratings
#CTCTOWALTZ-902
</addColumn>
</changeSet>
- <!-- 3077: Add shared_
-preference table -->
+
+ <!-- 3077: Add shared_preference table -->
<changeSet id="20180410-3077-1"
author="kamransaleem">
<comment>3077: Add shared_preference table</comment>
@@ -223,6 +223,94 @@ preference table -->
</changeSet>
+ <!-- 3104 Custom Rating Schemes -->
+ <changeSet id="20180410-3104-1"
+ author="davidwatkins73">
+ <createTable tableName="rating_scheme_definition">
+ <column name="id"
+ type="${id.type}"
+ autoIncrement="true">
+ <constraints nullable="false"
+ primaryKey="true"
+ primaryKeyName="rating_scheme_definition_pkey"/>
+ </column>
+ <column name="name"
+ type="${name.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="description"
+ type="${description.type}">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+ </changeSet>
+
+ <changeSet id="20180410-3104-2"
+ author="davidwatkins73">
+ <createTable tableName="rating_scheme_definition_item">
+ <column name="id"
+ type="${id.type}"
+ autoIncrement="true">
+ <constraints nullable="false"
+ primaryKey="true"
+ primaryKeyName="rating_definition_item_pkey"/>
+ </column>
+ <column name="scheme_definition_id"
+ type="${id.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="name"
+ type="${name.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="description"
+ type="${description.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="code"
+ type="${rag.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="color"
+ type="${name.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="position"
+ type="${int.type}"
+ defaultValueNumeric="0">
+ <constraints nullable="false"/>
+ </column>
+ <column name="needs_planned_date"
+ type="BOOLEAN"
+ defaultValueBoolean="false">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+ </changeSet>
+
+ <changeSet id="20180410-3104-3"
+ author="davidwatkins73">
+ <comment>3104: Add plan date to measurable rating </comment>
+ <addColumn tableName="measurable_rating">
+ <column name="planned_date"
+ type="TIMESTAMP">
+ <constraints nullable="true"/>
+ </column>
+ </addColumn>
+ </changeSet>
+
+ <changeSet id="20180410-3104-4"
+ author="davidwatkins73">
+ <!-- update measurable category -->
+ <addColumn tableName="measurable_category">
+ <column name="rating_scheme_definition_id"
+ type="${id.type}">
+ <constraints nullable="true"/>
+ </column>
+ </addColumn>
+ </changeSet>
+
+
<!-- 3022 - add external_id to physical_flow physical_flow -->
<changeSet id="20180423-3022-1"
author="kamransaleem">
