Skip to content

Conversation

@phiSgr
Copy link
Collaborator

@phiSgr phiSgr commented Oct 29, 2025

handle

  • old infra map where the key (table ID) does not contain db name
  • remote_plan where the remote ID
    • is old (point 1)
    • contains another DB name

Note

Make infra map diff/plan compatible with old table IDs (no DB prefix) and cross-DB IDs, add default_database to proto, and add E2E backward-compat tests in CI.

  • Core/Infra Map & Planning:
    • Use stable table IDs via Table::id(default_database) across diff/reality checks; add helper find_table_from_infra_map to match legacy IDs without DB prefix.
    • InfrastructureMap.diff_tables(_with_strategy) now keys by IDs and uses target default_database for comparisons; filters adds/removes via new matching.
    • reconcile_with_reality normalizes legacy map keys (rehashes IDs with DB) and updates default_database from project.
    • Add default_database to proto (InfrastructureMap) and round-trip it in serialization.
  • Partial Map (DMv2):
    • Clear primary_key flags when engine doesn’t support ORDER BY; propagate table TTL/index settings; compute IDs with DB.
  • Reality Checker:
    • Map actual tables by new ID format, compare with map after normalizing DB; compute missing/unmapped/mismatched using ID-aware logic; update tests accordingly.
  • ClickHouse:
    • Include database in TableWithUnsupportedType; richer logging for column modify; warn (not debug) on drop+create cases in diff strategy; refine PK/engine/partition handling.
  • Tests & CI:
    • Add E2E backward-compatibility tests (backward-compatibility.test.ts) and new GitHub Actions jobs for TS and Python; include them in final status gate.

Written by Cursor Bugbot for commit 7a2eb27. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
framework-docs Ready Ready Preview Comment Nov 3, 2025 11:23pm

phiSgr added a commit that referenced this pull request Oct 31, 2025
@phiSgr phiSgr requested a review from callicles October 31, 2025 17:55
cursor[bot]

This comment was marked as outdated.

@callicles
Copy link
Collaborator

Screenshot 2025-11-02 at 11 50 03 We should merge but it looks like there is still some things we need to look into for the table diffing

@phiSgr phiSgr added this pull request to the merge queue Nov 4, 2025
Merged via the queue into main with commit 158b42d Nov 4, 2025
40 checks passed
@phiSgr phiSgr deleted the fix/db-in-table-id branch November 4, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants