bladex.sqlserver.upgrade.4.1.0.to.4.2.0.sql 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. -- -----------------------------------
  2. -- 创建一个新的租户数据源表,与原数据源表结构一致
  3. -- -----------------------------------
  4. -- 复制表结构和数据
  5. SELECT * INTO [blade_tenant_datasource] FROM [blade_datasource];
  6. -- -----------------------------------
  7. -- 修改菜单名称避免重名
  8. -- -----------------------------------
  9. UPDATE [blade_menu] SET name='流程状态' WHERE code='flow_manager';
  10. -- -----------------------------------
  11. -- 新增本地存储字典
  12. -- -----------------------------------
  13. INSERT INTO [blade_dict] ([id], [parent_id], [code], [dict_key], [dict_value], [sort], [remark], [is_sealed], [status], [is_deleted])
  14. VALUES (1123598814738676231, 1123598814738676224, 'oss', '7', '本地存储', 7, '', 0, 1, 0);
  15. -- -----------------------------------
  16. -- 代码生成新增字段
  17. -- -----------------------------------
  18. ALTER TABLE [blade_code] ADD [menu_id] bigint
  19. GO
  20. EXEC sp_addextendedproperty
  21. 'MS_Description', N'上级菜单主键',
  22. 'SCHEMA', N'dbo',
  23. 'TABLE', N'blade_code',
  24. 'COLUMN', N'menu_id';
  25. -- -----------------------------------
  26. -- 代码生成配置表
  27. -- -----------------------------------
  28. CREATE TABLE [blade_code_setting] (
  29. [id] bigint NOT NULL,
  30. [settings] text,
  31. [status] int DEFAULT 1 NOT NULL,
  32. [is_deleted] int DEFAULT 0 NOT NULL,
  33. PRIMARY KEY CLUSTERED ([id] ASC)
  34. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  35. )
  36. GO
  37. EXEC sp_addextendedproperty
  38. 'MS_Description', N'主键',
  39. 'SCHEMA', N'dbo',
  40. 'TABLE', N'blade_code_setting',
  41. 'COLUMN', N'id'
  42. GO
  43. EXEC sp_addextendedproperty
  44. 'MS_Description', N'配置项',
  45. 'SCHEMA', N'dbo',
  46. 'TABLE', N'blade_code_setting',
  47. 'COLUMN', N'settings'
  48. GO
  49. EXEC sp_addextendedproperty
  50. 'MS_Description', N'状态',
  51. 'SCHEMA', N'dbo',
  52. 'TABLE', N'blade_code_setting',
  53. 'COLUMN', N'status'
  54. GO
  55. EXEC sp_addextendedproperty
  56. 'MS_Description', N'是否已删除',
  57. 'SCHEMA', N'dbo',
  58. 'TABLE', N'blade_code_setting',
  59. 'COLUMN', N'is_deleted'
  60. GO
  61. EXEC sp_addextendedproperty
  62. 'MS_Description', N'代码生成器配置表',
  63. 'SCHEMA', N'dbo',
  64. 'TABLE', N'blade_code_setting';
  65. -- -----------------------------------
  66. -- 更新菜单图标
  67. -- -----------------------------------
  68. UPDATE [blade_menu] SET source='iconfont icon-yonghu' WHERE id='1123598815738675204';
  69. UPDATE [blade_menu] SET source='iconfont icon-quanxianshenpi' WHERE id='1164733389668962251';
  70. UPDATE [blade_menu] SET source='iconfont icon-xiaoxitongzhi' WHERE id='1164733389658962251';
  71. UPDATE [blade_menu] SET source='iconfont icon-xingzhuang-tupian' WHERE id='1123598815738675299';
  72. UPDATE [blade_menu] SET source='iconfont icon-yingjian' WHERE id='1123598815738675298';
  73. UPDATE [blade_menu] SET source='iconfont icon-shoucang' WHERE id='1123598815738675209';
  74. UPDATE [blade_menu] SET source='iconfont icon-shouji' WHERE id='1123598815738675261';
  75. UPDATE [blade_menu] SET source='iconfont icon-peiwangyindao' WHERE id='1164733399668962201';
  76. UPDATE [blade_menu] SET source='iconfont icon-fuwudiqiu' WHERE id='1164733399668962202';
  77. UPDATE [blade_menu] SET source='iconfont icon-liujisuan' WHERE id='1164733399669962601';
  78. UPDATE [blade_menu] SET source='iconfont icon-PIR' WHERE id='1164733399669962501';
  79. UPDATE [blade_menu] SET source='iconfont icon-shebeizhuangtai' WHERE id='1123598815738675201';
  80. UPDATE [blade_menu] SET source='iconfont icon-guize' WHERE id='1123598815738675266';
  81. UPDATE [blade_menu] SET source='iconfont icon-shujukanban' WHERE id='1164733399669962301';
  82. UPDATE [blade_menu] SET source='iconfont icon-yishouquan' WHERE id='1123598815738675307';
  83. UPDATE [blade_menu] SET source='iconfont icon-huowudui' WHERE id='1123598815738675267';
  84. UPDATE [blade_menu] SET source='iconfont icon-shebeikaifa' WHERE id='1123598815738675217';
  85. UPDATE [blade_menu] SET source='iconfont icon-gaojing' WHERE id='1123598815738675210';
  86. UPDATE [blade_menu] SET source='iconfont icon-lianjieliu' WHERE id='1123598815738675280';
  87. UPDATE [blade_menu] SET source='iconfont icon-guanlianshebei' WHERE id='1164733399669962401';
  88. UPDATE [blade_menu] SET source='iconfont icon-hezuohuobanmiyueguanli' WHERE id='1123598815738675308';
  89. UPDATE [blade_menu] SET source='iconfont icon-ceshishenqing' WHERE id='1123598815738675309';
  90. UPDATE [blade_menu] SET source='iconfont icon-renjijiaohu' WHERE id='1123598815738675311';