fix(catalog): 快照节点绑定物化条目以显示导入进度

This commit is contained in:
姚章浩
2026-09-15 16:50:15 +08:00
parent 40d0c511d6
commit 0ef41594c2
8 changed files with 208 additions and 16 deletions
@@ -27,8 +27,17 @@ func TestV1Migration31SeedsRealSizedConnectionIDs(t *testing.T) {
t.Fatal(err)
}
// Roll back to just before migration 31 and re-enter it with live-shaped ids.
if err := RollbackLatestMigration(ctx, pool); err != nil {
t.Fatal(err)
for {
var version int
if err := pool.QueryRow(ctx, "SELECT MAX(version) FROM schema_migrations").Scan(&version); err != nil {
t.Fatal(err)
}
if version <= 30 {
break
}
if err := RollbackLatestMigration(ctx, pool); err != nil {
t.Fatal(err)
}
}
const uuidID = "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d" // exactly 36 chars
if _, err := pool.Exec(ctx, `INSERT INTO source_connections(id,source_type,name,enabled) VALUES($1,'alist','真实尺寸UUID源',true)`, uuidID); err != nil {