Files
photo-live/packages/db-cn/prisma/migrations/20260922174000_mapping_profile/migration.sql
T
2026-09-22 17:33:27 +08:00

8 lines
642 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- G4 后续:映射表增 profile JSON 列——同步源档案快照(工号/邮箱/公司/头像),
-- 纯展示维度:不参与同步决策(引擎幂等仍只看 sourceVersion),users 表零改动
-- (源身份隔离红线,见 user-source.port.ts / user-sync.service.ts 文件头)。
-- nullable:mock 源/历史行无快照;存量行由引擎「幂等跳过路径的展示补偿写」
-- 在下批同步自然回填(版本门跳过但 profile 缺失/变化时仅刷映射行)。
-- JSON 列无 collation,不涉 utf8mb4_0900_bin 手决项。
ALTER TABLE `external_user_mappings` ADD COLUMN `profile` JSON NULL;