alter table b_resource
    add location_type varchar(10);

comment
on column b_resource.location_type is '位置类型（水上和陆上）';

INSERT INTO sys_dict_type (dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark)
VALUES (22, '资源位置类型', 'zhdd_location_type', '0', 'admin', '2021-09-28 15:55:09', 'admin', '2021-09-28 15:55:09', null);

INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
VALUES (144, 0, '水上', '1', 'zhdd_location_type', null,
        'default', 'N', '0', 'admin', '2021-09-28 15:57:23', 'admin', '2021-09-28 15:57:23', null);
INSERT INTO sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
VALUES (145, 0, '陆上', '2', 'zhdd_location_type', null,
        'default', 'N', '0', 'admin', '2021-09-28 15:57:23', 'admin', '2021-09-28 15:57:23', null);

alter table b_incident
    add conclusion varchar(1000);

comment
on column b_incident.conclusion is '归档总结';

alter table b_incident
    add conclusion_file varchar(3000);

comment
on column b_incident.conclusion_file is '归档附件';

-- 2021-12-15
ALTER TABLE "public"."sys_dept"
    ADD COLUMN "other_id" varchar(64);

COMMENT
ON COLUMN "public"."sys_dept"."other_id" IS '其他系统编号';

ALTER TABLE "public"."sys_user"
    ADD COLUMN "other_id" varchar(64);

COMMENT
ON COLUMN "public"."sys_user"."other_id" IS '其他系统编号';


-- 2021-12-23 update
alter table sys_user alter column user_id type varchar(36) using user_id::varchar(36);
alter table sys_user
    alter column user_id drop default;
drop sequence sys_user_user_id_seq;
alter table sys_user alter column dept_id type varchar(36) using dept_id::varchar(36);
alter table sys_dept alter column dept_id type varchar(36) using dept_id::varchar(36);
alter table sys_dept
    alter column dept_id drop default;
drop sequence sys_dept_dept_id_seq;
alter table sys_dept alter column parent_id type varchar(36) using parent_id::varchar(36);
alter table sys_user_role alter column user_id type varchar(36) using user_id::varchar(36);
alter table sys_user_role alter column role_id type varchar(36) using role_id::varchar(36);
alter table sys_role alter column role_id type varchar(36) using role_id::varchar(36);
alter table sys_role
    alter column role_id drop default;
alter table sys_menu alter column menu_id type varchar(36) using menu_id::varchar(36);
alter table sys_menu
    alter column menu_id drop default;
alter table sys_user
    add org_id varchar(32);
comment
on column sys_user.org_id is '组织机构id';
alter table sys_user
    add superior varchar(50);

comment
on column sys_user.superior is '直属上级';

alter table sys_dept
    add code varchar(50);

comment
on column sys_dept.code is '代码';

alter table sys_dept
    add description varchar;

comment
on column sys_dept.description is '描述';

alter table sys_dept
    add "dept_short_name" varchar(100);

comment
on column sys_dept."dept_short_name" is '部门简称';

alter table sys_dept
    add "org_id" varchar(32);

comment
on column sys_dept."org_id" is '组织id';

alter table sys_user
    add id_number varchar(30);

comment
on column sys_user.id_number is '身份证';

alter table sys_user alter column phonenumber type varchar(20) using phonenumber::varchar(20);















