bladex.postgresql.upgrade.4.1.0.to.4.2.0.sql 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. -- -----------------------------------
  2. -- 创建一个新的租户数据源表,与原数据源表结构一致
  3. -- -----------------------------------
  4. -- 复制表结构
  5. CREATE TABLE "blade_tenant_datasource" AS TABLE blade_datasource WITH NO DATA;
  6. -- 复制表数据
  7. INSERT INTO "blade_tenant_datasource" SELECT * FROM blade_datasource;
  8. -- -----------------------------------
  9. -- 修改菜单名称避免重名
  10. -- -----------------------------------
  11. UPDATE "blade_menu" SET name='流程状态' WHERE code='flow_manager';
  12. -- -----------------------------------
  13. -- 新增本地存储字典
  14. -- -----------------------------------
  15. INSERT INTO "blade_dict" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (1123598814738676231, 1123598814738676224, 'oss', '7', '本地存储', 7, '', 0, 1, 0);
  16. -- -----------------------------------
  17. -- 代码生成新增字段
  18. -- -----------------------------------
  19. ALTER TABLE "blade_code"
  20. ADD COLUMN "menu_id" int8;
  21. COMMENT ON COLUMN "blade_code"."menu_id" IS '上级菜单主键';
  22. -- -----------------------------------
  23. -- 代码生成配置表
  24. -- -----------------------------------
  25. CREATE TABLE "blade_code_setting" (
  26. "id" int8 NOT NULL,
  27. "settings" text,
  28. "status" int4 DEFAULT 1,
  29. "is_deleted" int4 DEFAULT 0,
  30. PRIMARY KEY ("id")
  31. );
  32. COMMENT ON COLUMN "blade_code_setting"."id" IS '主键';
  33. COMMENT ON COLUMN "blade_code_setting"."settings" IS '配置项';
  34. COMMENT ON COLUMN "blade_code_setting"."status" IS '状态';
  35. COMMENT ON COLUMN "blade_code_setting"."is_deleted" IS '是否已删除';
  36. COMMENT ON TABLE "blade_code_setting" IS '代码生成器配置表';
  37. -- -----------------------------------
  38. -- 更新菜单图标
  39. -- -----------------------------------
  40. UPDATE "blade_menu" SET source='iconfont icon-yonghu' WHERE id='1123598815738675204';
  41. UPDATE "blade_menu" SET source='iconfont icon-quanxianshenpi' WHERE id='1164733389668962251';
  42. UPDATE "blade_menu" SET source='iconfont icon-xiaoxitongzhi' WHERE id='1164733389658962251';
  43. UPDATE "blade_menu" SET source='iconfont icon-xingzhuang-tupian' WHERE id='1123598815738675299';
  44. UPDATE "blade_menu" SET source='iconfont icon-yingjian' WHERE id='1123598815738675298';
  45. UPDATE "blade_menu" SET source='iconfont icon-shoucang' WHERE id='1123598815738675209';
  46. UPDATE "blade_menu" SET source='iconfont icon-shouji' WHERE id='1123598815738675261';
  47. UPDATE "blade_menu" SET source='iconfont icon-peiwangyindao' WHERE id='1164733399668962201';
  48. UPDATE "blade_menu" SET source='iconfont icon-fuwudiqiu' WHERE id='1164733399668962202';
  49. UPDATE "blade_menu" SET source='iconfont icon-liujisuan' WHERE id='1164733399669962601';
  50. UPDATE "blade_menu" SET source='iconfont icon-PIR' WHERE id='1164733399669962501';
  51. UPDATE "blade_menu" SET source='iconfont icon-shebeizhuangtai' WHERE id='1123598815738675201';
  52. UPDATE "blade_menu" SET source='iconfont icon-guize' WHERE id='1123598815738675266';
  53. UPDATE "blade_menu" SET source='iconfont icon-shujukanban' WHERE id='1164733399669962301';
  54. UPDATE "blade_menu" SET source='iconfont icon-yishouquan' WHERE id='1123598815738675307';
  55. UPDATE "blade_menu" SET source='iconfont icon-huowudui' WHERE id='1123598815738675267';
  56. UPDATE "blade_menu" SET source='iconfont icon-shebeikaifa' WHERE id='1123598815738675217';
  57. UPDATE "blade_menu" SET source='iconfont icon-gaojing' WHERE id='1123598815738675210';
  58. UPDATE "blade_menu" SET source='iconfont icon-lianjieliu' WHERE id='1123598815738675280';
  59. UPDATE "blade_menu" SET source='iconfont icon-guanlianshebei' WHERE id='1164733399669962401';
  60. UPDATE "blade_menu" SET source='iconfont icon-hezuohuobanmiyueguanli' WHERE id='1123598815738675308';
  61. UPDATE "blade_menu" SET source='iconfont icon-ceshishenqing' WHERE id='1123598815738675309';
  62. UPDATE "blade_menu" SET source='iconfont icon-renjijiaohu' WHERE id='1123598815738675311';