revert(permission): V165 删除常用工具菜单行与授权
回滚 V163 落库的 brand_common_tools 组与三个工具子菜单、全部账号直授; V163 文件保留(Flyway validate 要求已应用迁移可解析),种子默认项同步移除。
This commit is contained in:
-1
@@ -33,7 +33,6 @@ public class PermissionMenuSchemaInitializer {
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
|
||||
private static final List<DefaultAppMenu> DEFAULT_APP_MENUS = List.of(
|
||||
new DefaultAppMenu("常用工具", "brand_common_tools", "brand-common-tools", 105),
|
||||
new DefaultAppMenu("前端工具", "brand_front_tools", "brand-front-tools", 110),
|
||||
new DefaultAppMenu("运营工具", "brand_operation_tools", "brand-operation-tools", 120),
|
||||
new DefaultAppMenu("后勤工具", "brand_logistics_tools", "brand-logistics-tools", 130)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
-- =============================================================
|
||||
-- 迁移 V165__remove_brand_common_tools_menu
|
||||
--
|
||||
-- 1. 变更目的:按 2026-10-24 决定回滚「常用工具」分类——删除 V163 落库的
|
||||
-- brand_common_tools 组行、三个工具子菜单(pricing-calc / five-asin /
|
||||
-- keyword-share)及全部账号对它们的直授。前端入口同步下线。
|
||||
-- V163 文件本身保留(Flyway validate-on-migrate 要求已应用迁移可解析,禁止删文件)。
|
||||
--
|
||||
-- 2. 顺序:先删授权(user_column_permission → columns 无级联,残留会指向不存在的行),
|
||||
-- 再删子菜单(parent_id 外键 ON DELETE RESTRICT,父行必须在子行之后删)。
|
||||
--
|
||||
-- 3. 可重跑性:两条 DELETE 命中 0 行即 no-op。
|
||||
-- =============================================================
|
||||
|
||||
DELETE g
|
||||
FROM `user_column_permission` g
|
||||
JOIN `columns` c ON c.`id` = g.`column_id`
|
||||
WHERE c.`column_key` IN ('pricing-calc', 'five-asin', 'keyword-share', 'brand_common_tools');
|
||||
|
||||
DELETE FROM `columns`
|
||||
WHERE `column_key` IN ('pricing-calc', 'five-asin', 'keyword-share');
|
||||
|
||||
DELETE FROM `columns`
|
||||
WHERE `column_key` = 'brand_common_tools';
|
||||
Reference in New Issue
Block a user