From 4fd0a89dc5d81537adcf90d6b7ef62fd56097c7b Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Thu, 31 Aug 2023 11:51:41 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.0=E3=80=91=E3=80=90tenant=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=BB=98=E8=AE=A4=E7=A7=9F=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V8.0.0_20230830_0035__remove_system_tenant_id.sql | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel-s-system/system-spring-boot-starter/src/main/resources/db/migration/mysql/V8.0.0_20230830_0035__remove_system_tenant_id.sql b/kernel-s-system/system-spring-boot-starter/src/main/resources/db/migration/mysql/V8.0.0_20230830_0035__remove_system_tenant_id.sql index 1f5ef0e37..a12c8c0af 100644 --- a/kernel-s-system/system-spring-boot-starter/src/main/resources/db/migration/mysql/V8.0.0_20230830_0035__remove_system_tenant_id.sql +++ b/kernel-s-system/system-spring-boot-starter/src/main/resources/db/migration/mysql/V8.0.0_20230830_0035__remove_system_tenant_id.sql @@ -16,4 +16,13 @@ ALTER TABLE `sys_role_menu_options` DROP COLUMN `tenant_id`; ALTER TABLE `sys_hr_org_approver` DROP COLUMN `tenant_id`; -ALTER TABLE `sys_portal_user_app` DROP COLUMN `tenant_id`; \ No newline at end of file +ALTER TABLE `sys_portal_user_app` DROP COLUMN `tenant_id`; + +-- 增加默认租户数据,默认租户id是1 +update sys_user set tenant_id = 1 where tenant_id is null; + +update sys_role set tenant_id = 1 where tenant_id is null; + +update sys_hr_position set tenant_id = 1 where tenant_id is null; + +update sys_hr_organization set tenant_id = 1 where tenant_id is null; \ No newline at end of file