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