Files
photo-live/packages/db-ov/prisma/migrations/20260920140341_embed_slots_ov/migration.sql
T
2026-09-20 22:22:19 +08:00

19 lines
833 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.
-- P4b Task 2:展示位副本表(cn embed_slots 的展示投影,slot-state 事件应用)。
-- 校对手决:Prisma 生成 DDL 固定 utf8mb4_unicode_ci,改写为库级约定的
-- utf8mb4_0900_bin(slotToken 主键/albumPublicToken 的大小写敏感寻址语义
-- 依赖它,同 albums_ov.publicToken 口径)。无墓碑:下线是 enabled=false 的
-- 全量快照替换(cn 无删除端点)。
-- CreateTable
CREATE TABLE `embed_slots_ov` (
`slotToken` VARCHAR(32) NOT NULL,
`enabled` BOOLEAN NOT NULL DEFAULT true,
`albumPublicToken` VARCHAR(32) NULL,
`configVersion` INTEGER NOT NULL DEFAULT 1,
`settings` JSON NOT NULL,
`entityVersion` INTEGER NOT NULL,
`updatedAt` DATETIME(6) NOT NULL,
PRIMARY KEY (`slotToken`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin;