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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. -- -----------------------------------
  2. -- 创建一个新的租户数据源表,与原数据源表结构一致
  3. -- -----------------------------------
  4. -- 复制表结构和数据
  5. CREATE TABLE BLADE_TENANT_DATASOURCE AS SELECT * FROM BLADE_DATASOURCE WHERE 1=0;
  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 ("MENU_ID" NUMBER(20,0));
  21. COMMENT ON COLUMN "BLADE_CODE"."MENU_ID" IS '上级菜单主键';
  22. -- -----------------------------------
  23. -- 代码生成配置表
  24. -- -----------------------------------
  25. CREATE TABLE "BLADE_CODE_SETTING" (
  26. "ID" NUMBER(20,0) NOT NULL,
  27. "SETTINGS" CLOB,
  28. "STATUS" NUMBER(11,0) DEFAULT 1,
  29. "IS_DELETED" NUMBER(11,0) 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';