新增旧玩法表阶段一清空迁移能力 (#251)
Project CI / Frontend tests (push) Successful in 3m11s
Project CI / Backend tests (push) Successful in 6m52s
Project CI / Repository checks (push) Failing after 53s
Project CI / Native shell tests (push) Failing after 17m50s

阶段一新增受 migration operator 保护的旧玩法表清空 procedure,暂不删除表定义。\n\n固定 63 张旧表,支持 dry-run 与事务 apply;生成 bindings;更新契约和决策记录;保留阶段二删表 TODO。\n\n已完成 cargo check、migration 测试、bindings/schema/encoding/diff 检查;本地 dry-run 返回 63 张表且全为 0 行,未执行 apply。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/251
This commit was merged in pull request #251.
This commit is contained in:
2026-09-03 12:57:01 +08:00
parent 8ed0626627
commit 025f627297
1454 changed files with 358 additions and 582058 deletions
+2 -52
View File
@@ -15,38 +15,6 @@ function readUtf8(relativePath) {
}
const forbiddenSnippets = [
{
file: 'server-rs/crates/spacetime-module/src/puzzle.rs',
snippet:
'.puzzle_work_profile()\n .iter()\n .filter(|row| row.owner_user_id == input.owner_user_id)',
reason: 'puzzle_work_profile 已有 by_puzzle_work_owner_user_id 索引',
},
{
file: 'server-rs/crates/spacetime-module/src/puzzle.rs',
snippet:
'.puzzle_work_profile()\n .iter()\n .filter(|row| row.publication_status == PuzzlePublicationStatus::Published)',
reason: 'puzzle_work_profile 已有 by_puzzle_work_publication_status 索引',
},
{
file: 'server-rs/crates/spacetime-module/src/puzzle.rs',
snippet:
'.puzzle_leaderboard_entry()\n .iter()\n .filter(|row| row.profile_id == profile_id && row.grid_size == grid_size)',
reason:
'puzzle_leaderboard_entry 已有 by_puzzle_leaderboard_profile_grid 索引',
},
{
file: 'server-rs/crates/spacetime-module/src/match3d.rs',
snippet:
'.match3d_work_profile()\n .iter()\n .filter(|row| {',
reason: 'match3d_work_profile 已有 owner/status 索引,列表不应整表过滤',
},
{
file: 'server-rs/crates/spacetime-module/src/visual_novel.rs',
snippet:
'.visual_novel_work_profile()\n .iter()\n .filter(|row| {',
reason:
'visual_novel_work_profile 已有 owner/status 索引,列表不应整表过滤',
},
{
file: 'server-rs/crates/spacetime-module/src/asset_metadata/objects.rs',
snippet:
@@ -123,20 +91,6 @@ const forbiddenSnippets = [
reason:
'tracking_daily_stat 已有 by_tracking_daily_stat_scope_day / event_day 索引,analytics 查询不应整表过滤',
},
{
file: 'server-rs/crates/spacetime-module/src/custom_world.rs',
snippet:
'.custom_world_profile()\n .iter()\n .find(|row| {',
reason:
'custom_world_profile owner 维度已有 by_custom_world_profile_owner_user_id 索引',
},
{
file: 'server-rs/crates/spacetime-module/src/custom_world.rs',
snippet:
'.custom_world_profile()\n .iter()\n .filter(|profile| {',
reason:
'custom_world_profile Published 同步已有 by_custom_world_profile_publication_status 索引',
},
{
file: 'server-rs/crates/spacetime-module/src/editor_project_storage.rs',
snippet:
@@ -149,8 +103,8 @@ const forbiddenSnippets = [
const procedureResultFiles = [];
const mapperCompatibilityFiles = [
'server-rs/crates/spacetime-client/src/mapper.rs',
'server-rs/crates/spacetime-client/src/lib.rs',
'server-rs/crates/spacetime-client/src/active/mapper.rs',
'server-rs/crates/spacetime-client/src/active.rs',
];
const bigFishRuntimeFiles = [];
@@ -188,10 +142,6 @@ const failures = [];
for (const rule of forbiddenSnippets) {
if (
rule.file.endsWith('/puzzle.rs') ||
rule.file.endsWith('/match3d.rs') ||
rule.file.endsWith('/visual_novel.rs') ||
rule.file.endsWith('/custom_world.rs') ||
rule.reason.startsWith('profile_save_archive') ||
rule.reason.startsWith('profile_played_world')
) {