<?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.4.xsd">
    <changeSet author="shg" id="1619520700565-1">
        <preConditions onFail="MARK_RAN">
            <not>
                <columnExists tableName="p_point" columnName="area_id"/>
            </not>
        </preConditions>
        <comment>p_point add column area_id</comment>
        <sql>
            ALTER TABLE `p_point`
            ADD COLUMN `area_id` bigint(20) DEFAULT NULL COMMENT '物理区域id（数据来源于装备wl_area）';
        </sql>
    </changeSet>
    <changeSet author="wjk" id="1619683142000-1">
        <preConditions onFail="MARK_RAN">
            <not>
                <columnExists tableName="p_point" columnName="area_name"/>
            </not>
        </preConditions>
        <comment>p_point add column area_id</comment>
        <sql>
            ALTER TABLE `p_point`
            ADD COLUMN `area_name` varchar(255) DEFAULT NULL COMMENT '物理区域名称（数据来源于装备wl_area）';
        </sql>
    </changeSet>
    
     <changeSet author="maoying" id="16272868380001-1">
        <preConditions onFail="MARK_RAN">
             <columnExists tableName="p_plan_task" columnName="user_dept"/>
        </preConditions>
        <comment>MODIFY user_dept </comment>
        <sql>
           ALTER TABLE `p_plan_task`
			MODIFY COLUMN `user_dept`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '人员部门信息';
        </sql>
    </changeSet>
    
    <changeSet author="maoying" id="16272868380001-2">
        <preConditions onFail="MARK_RAN">
             <columnExists tableName="p_plan_task" columnName="user_name"/>
        </preConditions>
        <comment>MODIFY user_name </comment>
        <sql>
           ALTER TABLE `p_plan_task`
			MODIFY COLUMN `user_name`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户姓名' ;
        </sql>
    </changeSet>
    
    <changeSet author="maoying" id="16272868380001-3">
        <preConditions onFail="MARK_RAN">
             <columnExists tableName="p_check" columnName="user_id"/>
        </preConditions>
        <comment>MODIFY user_id </comment>
        <sql>
           ALTER TABLE `p_check`
			MODIFY COLUMN `user_id`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '巡检人id，有可能有多个以,隔开';
        </sql>
    </changeSet>
    
    <changeSet author="maoying" id="16272868380001-4">
        <preConditions onFail="MARK_RAN">
             <columnExists tableName="p_check" columnName="dep_id"/>
        </preConditions>
        <comment>MODIFY dep_id </comment>
        <sql>
           ALTER TABLE `p_check`
			MODIFY COLUMN `dep_id`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '执行部门ids' ;
        </sql>
    </changeSet>
    
    <changeSet author="maoying" id="16272868380001-5">
        <preConditions onFail="MARK_RAN">
             <columnExists tableName="p_check" columnName="dep_name"/>
        </preConditions>
        <comment>MODIFY dep_name </comment>
        <sql>
           ALTER TABLE `p_check`
			MODIFY COLUMN `dep_name`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '执行部门名称';
        </sql>
    </changeSet>
</databaseChangeLog>