diff --git a/output/appointment-gray-release/preflight.json b/output/appointment-gray-release/preflight.json new file mode 100644 index 00000000..84c1d023 --- /dev/null +++ b/output/appointment-gray-release/preflight.json @@ -0,0 +1,26 @@ +{ + "scope": [ + "admin-web", + "firstleg", + "lastleg-service" + ], + "databaseAuthorized": true, + "schemaPreflight": { + "appointmentRows": 0, + "itemRows": 0, + "permissionConflicts": 0, + "adminRoleCount": 1, + "affectedAdminSubjects": 1 + }, + "targets": { + "backend": "7fd7699f6", + "admin": "73c29f5" + }, + "sourceEquivalence": { + "backendMergeTreeMatchesTestedSource": true, + "adminMergeTreeMatchesTestedSource": true + }, + "sqlExecuted": false, + "deployed": false, + "pending": "explicit approval for two isolated remote release branches required by repository instructions; main rejects direct pushes" +} \ No newline at end of file diff --git a/output/appointment-gray-release/review-schema-permissions.sql b/output/appointment-gray-release/review-schema-permissions.sql new file mode 100644 index 00000000..c8a1d26c --- /dev/null +++ b/output/appointment-gray-release/review-schema-permissions.sql @@ -0,0 +1,35 @@ +-- REVIEW ONLY: gray appointment schema and platform administrator permissions. +-- Execute only with explicit gray SQL authorization, after verifying both appointment tables remain empty. +-- No DROP TABLE, DELETE, TRUNCATE, or business-data backfill. +-- DDL auto-commits; stop immediately on any error. Do not use mysql --force. +USE baiyue_lastleg; +ALTER TABLE ll_inbound_fba_appointment + DROP INDEX uk_ll_fba_appointment_no, + DROP INDEX idx_ll_fba_appointment_list, + DROP COLUMN customer_id, + ADD COLUMN appointment_end_at DATETIME(3) NULL COMMENT '预约结束时间,未明确时为空' AFTER appointment_at, + ADD COLUMN version INT NOT NULL DEFAULT 0 COMMENT '并发版本' AFTER appointment_end_at, + ADD UNIQUE KEY uk_ll_fba_appointment_no (appointment_no), + ADD KEY idx_ll_fba_appointment_list (appointment_at, appointment_status, fba_warehouse_code); +ALTER TABLE ll_inbound_fba_appointment_item + ADD COLUMN customer_id VARCHAR(128) NOT NULL COMMENT '本票货物客户ID' AFTER appointment_id, + ADD KEY idx_ll_fba_appointment_item_cargo (line_id, appointment_id); +USE baiyue_iam; +START TRANSACTION; +INSERT INTO iam_permission + (id,tenant_id,app_code,permission_type,parent_id,permission_code,permission_name,route_path,http_method,sort_no,status,built_in,deleted) +VALUES + (5107280,0,'PLATFORM','MENU',0,'platform:appointment:list','预约列表','/appointment-calendar','GET',740,'ACTIVE',1,0), + (5107281,0,'PLATFORM','BUTTON',5107280,'platform:appointment:delete','删除预约',NULL,'DELETE',741,'ACTIVE',1,0); +INSERT INTO iam_role_permission (tenant_id,role_id,permission_id,created_at) +SELECT 0,r.id,p.id,NOW(3) FROM iam_role r CROSS JOIN iam_permission p +WHERE r.id=4000001 AND r.tenant_id=0 AND r.role_code='PLATFORM_ADMIN' AND r.status='ACTIVE' AND r.deleted=0 +AND p.id IN (5107280,5107281); +INSERT INTO iam_security_subject_version (auth_user_id,permission_version,updated_at) +SELECT DISTINCT u.auth_user_id,1,NOW(3) +FROM iam_membership_role mr +JOIN iam_membership m ON m.id=mr.membership_id AND m.tenant_id=mr.tenant_id +JOIN iam_user u ON u.id=m.user_id +WHERE mr.tenant_id=0 AND mr.role_id=4000001 AND m.deleted=0 AND u.deleted=0 +ON DUPLICATE KEY UPDATE permission_version=permission_version+1,updated_at=NOW(3); +COMMIT;