TASKPM/libreplan-business/src/main/resources/db.changelog-1.3.xml
Manuel Rego Casasnovas 805f65b9ea Add new field to configure seconds for planning warning
FEA: ItEr77S03Community
2012-11-26 18:06:37 +01:00

211 lines
8.6 KiB
XML

<?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 id="change-column-notes-in-task_element-to-text"
author="jaragunde" dbms="postgresql">
<comment>Change column notes in task_element to TEXT</comment>
<modifyDataType tableName="task_element" columnName="notes" newDataType="TEXT" />
</changeSet>
<changeSet id="change-column-notes-in-task_element-to-text-in-mysql"
author="jaragunde" dbms="mysql">
<comment>Change column notes in task_element to TEXT in MySQL.</comment>
<sql>ALTER TABLE task_element MODIFY notes TEXT</sql>
</changeSet>
<changeSet id="update-work_report_type-name-to-personal-timehseets"
author="mrego">
<comment>
Update work_report_type name from "Monthly timesheets" to "Personal
timehsheets"
</comment>
<update tableName="work_report_type">
<column name="name" value="Personal timesheets"/>
<where>name='Monthly timesheets'</where>
</update>
</changeSet>
<changeSet id="add-personal_timesheets_periodicity-column-to-configuration"
author="mrego">
<comment>Add personal_timesheets_periodicity column to configuration</comment>
<addColumn tableName="configuration">
<column name="personal_timesheets_periodicity" type="INTEGER" />
</addColumn>
<update tableName="configuration">
<column name="personal_timesheets_periodicity" value="0" />
</update>
</changeSet>
<changeSet id="rename-column-from-monthly-to-personal-in-configuration"
author="mrego">
<comment>
Rename column monthly_timesheets_type_of_work_hours to
personal_timesheets_type_of_work_hours in configuration table
</comment>
<dropForeignKeyConstraint baseTableName="configuration"
constraintName="configuration_type_of_work_hours_fkey"/>
<renameColumn tableName="configuration"
oldColumnName="monthly_timesheets_type_of_work_hours"
newColumnName="personal_timesheets_type_of_work_hours"
columnDataType="BIGINT" />
<addForeignKeyConstraint constraintName="configuration_type_of_work_hours_fkey"
baseTableName="configuration" baseColumnNames="personal_timesheets_type_of_work_hours"
referencedTableName="type_of_work_hours" referencedColumnNames="id" />
</changeSet>
<changeSet id="add-max_users-and-max_resources-columns-to-configuration"
author="mrego">
<comment>Add max_users and max_resources columns to configuration</comment>
<addColumn tableName="configuration">
<column name="max_users" type="INTEGER" />
</addColumn>
<addColumn tableName="configuration">
<column name="max_resources" type="INTEGER" />
</addColumn>
<update tableName="configuration">
<column name="max_users" value="0" />
</update>
<update tableName="configuration">
<column name="max_resources" value="0" />
</update>
</changeSet>
<changeSet id="add-columns-first-and-last-timesheet_date-to-sum_charged_effort"
author="mrego">
<comment>
Add columns first_timesheet_date and last_timesheet_date to
sum_charged_effort table
</comment>
<addColumn tableName="sum_charged_effort">
<column name="first_timesheet_date" type="DATETIME" />
</addColumn>
<addColumn tableName="sum_charged_effort">
<column name="last_timesheet_date" type="DATETIME" />
</addColumn>
</changeSet>
<changeSet id="add-new-column-read_only-to-advance_type" author="mrego">
<comment>
Add new column read_only with default value FALSE to advance_type
table.
</comment>
<addColumn tableName="advance_type">
<column name="read_only" type="BOOLEAN" />
</addColumn>
<addDefaultValue tableName="advance_type" columnName="read_only"
defaultValueBoolean="FALSE" />
<addNotNullConstraint tableName="advance_type"
columnName="read_only"
defaultNullValue="FALSE"
columnDataType="BOOLEAN" />
</changeSet>
<changeSet id="add-new-column-finished-to-work_report_line" author="mrego">
<comment>
Add new column finished with default value FALSE to
work_report_line table.
</comment>
<addColumn tableName="work_report_line">
<column name="finished" type="BOOLEAN" />
</addColumn>
<addDefaultValue tableName="work_report_line" columnName="finished"
defaultValueBoolean="FALSE" />
<addNotNullConstraint tableName="work_report_line"
columnName="finished"
defaultNullValue="FALSE"
columnDataType="BOOLEAN" />
</changeSet>
<changeSet id="add-new-column-finished_timesheets-to-sum_charged_effort"
author="mrego">
<comment>
Add new column finished_timesheets with default value FALSE to
sum_charged_effort table.
</comment>
<addColumn tableName="sum_charged_effort">
<column name="finished_timesheets" type="BOOLEAN" />
</addColumn>
<addDefaultValue tableName="sum_charged_effort"
columnName="finished_timesheets"
defaultValueBoolean="FALSE" />
<addNotNullConstraint tableName="sum_charged_effort"
columnName="finished_timesheets"
defaultNullValue="FALSE"
columnDataType="BOOLEAN" />
</changeSet>
<changeSet id="add-new-column-updated_from_timesheets-to-task_element"
author="mrego">
<comment>
Add new column updated_from_timesheets with default value FALSE to
task_element table.
</comment>
<addColumn tableName="task_element">
<column name="updated_from_timesheets" type="BOOLEAN" />
</addColumn>
<addDefaultValue tableName="task_element"
columnName="updated_from_timesheets"
defaultValueBoolean="FALSE" />
<addNotNullConstraint tableName="task_element"
columnName="updated_from_timesheets"
defaultNullValue="FALSE"
columnDataType="BOOLEAN" />
</changeSet>
<changeSet id="update-status-values-in-order_table" author="mrego">
<comment>Updating status values in order_table</comment>
<update tableName="order_table">
<column name="state" value="8" />
<where>state='6'</where>
</update>
<update tableName="order_table">
<column name="state" value="7" />
<where>state='4'</where>
</update>
<update tableName="order_table">
<column name="state" value="6" />
<where>state='3'</where>
</update>
<update tableName="order_table">
<column name="state" value="4" />
<where>state='2'</where>
</update>
<update tableName="order_table">
<column name="state" value="3" />
<where>state='1'</where>
</update>
<update tableName="order_table">
<column name="state" value="2" />
<where>state='5'</where>
</update>
<update tableName="order_table">
<column name="state" value="1" />
<where>state='0'</where>
</update>
</changeSet>
<changeSet id="drop-unique-constraint-code-in-order_element" author="mrego">
<comment>Drop unique constraint for code in order_element table</comment>
<dropUniqueConstraint tableName="order_element"
constraintName="order_element_code_key" />
</changeSet>
<changeSet id="add-seconds_planning_warning-column-to-configuration"
author="mrego">
<comment>Add seconds_planning_warning column to configuration</comment>
<addColumn tableName="configuration">
<column name="seconds_planning_warning" type="INTEGER" />
</addColumn>
<update tableName="configuration">
<column name="seconds_planning_warning" value="30" />
</update>
<addNotNullConstraint tableName="configuration"
columnName="seconds_planning_warning"
defaultNullValue="30"
columnDataType="INTEGER" />
</changeSet>
</databaseChangeLog>