Repository navigation
Conversation
… propagation Replace the hash-gated apply flow with a self-contained SQL Server plan file. Plan observes the target once and writes every action; Apply verifies the file's integrity and re-plans before running, refusing it as stale when the target moved. Script effects are derived from T-SQL analysis so upstream writers propagate to dependent scripts, and module catalog reads are batched per dependency level instead of per script. BREAKING CHANGE: migrate apply no longer takes --hash or --artifact; pass the plan file as the argument. backend.Open, Session, Inspect, Preview and ContinuationError are removed in favor of Plan and Apply. The file's hash guards integrity only, not approval of the target state. The plan file records observed inputs, so a stale plan fails before any script runs rather than being silently re-selected.
…by T-SQL and SQL statements
Migrations now take a plan file as their only input. migrate plan writes .sqlglot-go/plan.json (or --out) and prints a summary to stderr; migrate apply and review read that file. The --hash, --artifact flags are removed, so apply no longer requires a reviewed hash. The plan file's own hash only guards integrity, and apply refuses a stale plan when the target changed since planning. Positional source paths let plan detect SQL and HCL by content. Web UI, docs and tests are updated to match. BREAKING CHANGE: --hash and --artifact are removed from migrate apply/review; pass the plan file positionally instead. The HTTP apply endpoint rejects the hash field.
Plan reads the newest ledger row per path across the scope and the absorbed scopes, and apply merges them into the target scope in one transaction. Plan files move to version 2 with an absorbed list; version 1 files are refused and must be regenerated.
…unrecorded inputs
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sqlserver/adopt.goand its integration testdocs/guide/cli.mdNotes
database/migrate/scripts(model, plan, scripts tests) and the SQL Server package (apply, barrier, execute, session)