diff --git a/crates/utopia-cli/src/main.rs b/crates/utopia-cli/src/main.rs index c42e44090..898b474da 100644 --- a/crates/utopia-cli/src/main.rs +++ b/crates/utopia-cli/src/main.rs @@ -82,7 +82,7 @@ struct ManifestDataDir { /// not a side effect of a code change. // 是迁移文件的**个数**,不是最大的编号(守卫 `schema_version_policy_compares_against_current` // 按个数比):编号有空缺时两者不同——0071 由一个开放 PR 占着,0072 先落,个数是 71 -const CURRENT_SCHEMA_VERSION: u32 = 112; +const CURRENT_SCHEMA_VERSION: u32 = 113; fn main() -> anyhow::Result<()> { dotenvy::dotenv().ok(); diff --git a/migrations/9007_a_mirror_source_declares_its_names_identities.sql b/migrations/9007_a_mirror_source_declares_its_names_identities.sql new file mode 100644 index 000000000..8e9c54514 --- /dev/null +++ b/migrations/9007_a_mirror_source_declares_its_names_identities.sql @@ -0,0 +1,12 @@ +-- re:cinq fork only (RE-CINQ.md: fork migrations are numbered from 9000 and idempotent). +-- +-- 这个部署上的 statements 源都是 Lore 的镜像:推来的名字(owner/repo:path#symbol)本身就是唯一 +-- 标识。0071 让源用 {"names": "identity"} 声明这一点;从前 fork 对所有推送名字一律跳过召回, +-- 换成上游的按源开关之后,要在这里替现有的镜像源把开关打开,行为才不倒退。 +-- +-- 只补还没有 names 键的 statements 源:人手设过的不动,第二次运行什么都不改。 +-- 之后新建的源要由创建方自己带上这个键。 +UPDATE sources + SET config = config || '{"names": "identity"}'::jsonb + WHERE kind = 'statements' + AND NOT config ? 'names';