Repository navigation
feat: standalone inspect and migrate - #10
Merged
Merged
Conversation
This was referenced Oct 22, 2026
moshloop
added this pull request to stack #11
October 22, 2026 12:40
moshloop
force-pushed
the
feat/standalone-inspect-migrate-dmbctdx4xeds
branch
from
October 22, 2026 12:41
3264e44 to
1d74c75
Compare
Claude-Session-Id: 01a15eea-9e79-7161-890a-03eac0c66cf1
Move live inspection, capabilities, Atlas SQL Server integration, and bundle migration engines from commons-db into sqlglot-go/database. Keep commons-db as typed compatibility shims and preserve SQL Server v1 artifact hashes and locking. Add one schema inspect and migrate plan/apply CLI, read-only script analysis, and reviewed PostgreSQL/SQLite schema artifacts with exact saved SQL, bounded locking, destructive acknowledgements, drift detection, rollback, and postconditions. Resolve HCL primary-key names, SQL literals, and effective collations before building SQL Server artifacts. Validation: all 10 tracked Gavel fixture gates pass, including standalone tests, build, native lint, SQLite example, PostgreSQL reviewed execution, commons-db compatibility, and remote SQL Server runtime and bundle execution. The general Gavel test adapter separately reports missing Ginkgo metadata; the command fixture runs successfully. Reviewed PostgreSQL script/security bundles and OIPA deployment integration remain tracked backlog work. This builds on the trigger and planner changes in sqlglot-go PR #9. Gavel-Issue-Id: e5e4b378-75e4-4291-9c72-585d138a7cef
Expose the connectionless PlanApplier from the standalone SQL Server runtime so commons-db can retain its original DefaultPlan API. Planning remains available without a database; execution retains the existing explicit no-connection error. Validated with a Ginkgo regression covering both methods, make build, and native lint with zero issues.
Normalize native separators and keep drive letters in the file URI path rather than the authority. Windows migration and CLI tests failed because file://C:%5C... was parsed as a host with an invalid port. Add platform-independent drive URI regression coverage and verify that native filenames with spaces and URL punctuation create the exact intended SQLite file. Database and CLI tests, make build, and native lint pass.
moshloop
force-pushed
the
feat/standalone-inspect-migrate-dmbctdx4xeds
branch
from
October 22, 2026 12:55
1d74c75 to
b71d8ea
Compare
Claude-Session-Id: 01a15eea-9e79-7161-890a-03eac0c66cf1
moshloop
added a commit
that referenced
this pull request
Oct 22, 2026
Mirror the verified DefaultPlan compatibility export from sqlglot-go PR #10 into the original checkout. Ginkgo verifies planning and refusal to execute without a database connection.
moshloop
added a commit
that referenced
this pull request
Oct 22, 2026
Retain the verified PR #10 fix in the original checkout: convert native separators and keep drive letters in URI paths. Ginkgo covers drive URI encoding and exact filenames with spaces and URL punctuation.
Claude-Session-Id: 01a15eea-9e79-7161-890a-03eac0c66cf1
Claude-Session-Id: 01a15eea-9e79-7161-890a-03eac0c66cf1
moshloop
added a commit
to flanksource/commons-db
that referenced
this pull request
Oct 23, 2026
Replace commons-db SQL inspection, capabilities, custom Atlas SQL Server runtime, target parsing, catalog readers, and migration engines with typed sqlglot-go shims. Preserve existing public options and types, caller-owned handles, PostgreSQL bundle behavior, and catalog cache metadata. Move implementation-owned tests with the engine and retain consumer compatibility coverage. Pin sqlglot-go v1.0.4-0.20261022121445-328654b54c0a, the published commit from flanksource/sqlglot-go#10, so the new packages resolve without a local replacement. Merge the sqlglot dependency PR first. Validation: all 10 tracked database Gavel fixture gates pass, including SQLite API/cache compatibility, existing PostgreSQL bundle/view-dependency migrations, and the standalone native engine suite. Unrelated Git, query, and connection changes are excluded from this commit. Gavel-Issue-Id: e5e4b378-75e4-4291-9c72-585d138a7cef
moshloop
marked this pull request as ready for review
October 23, 2026 03:56
|
🎉 This PR is included in version 1.0.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
moshloop
added a commit
to flanksource/commons-db
that referenced
this pull request
Oct 23, 2026
Replace commons-db SQL inspection, capabilities, custom Atlas SQL Server runtime, target parsing, catalog readers, and migration engines with typed sqlglot-go shims. Preserve existing public options and types, caller-owned handles, PostgreSQL bundle behavior, and catalog cache metadata. Move implementation-owned tests with the engine and retain consumer compatibility coverage. Pin sqlglot-go v1.0.4-0.20261022121445-328654b54c0a, the published commit from flanksource/sqlglot-go#10, so the new packages resolve without a local replacement. Merge the sqlglot dependency PR first. Validation: all 10 tracked database Gavel fixture gates pass, including SQLite API/cache compatibility, existing PostgreSQL bundle/view-dependency migrations, and the standalone native engine suite. Unrelated Git, query, and connection changes are excluded from this commit. Gavel-Issue-Id: e5e4b378-75e4-4291-9c72-585d138a7cef
moshloop
added a commit
to flanksource/commons-db
that referenced
this pull request
Oct 23, 2026
Replace commons-db SQL inspection, capabilities, custom Atlas SQL Server runtime, target parsing, catalog readers, and migration engines with typed sqlglot-go shims. Preserve existing public options and types, caller-owned handles, PostgreSQL bundle behavior, and catalog cache metadata. Move implementation-owned tests with the engine and retain consumer compatibility coverage. Pin sqlglot-go v1.0.4-0.20261022121445-328654b54c0a, the published commit from flanksource/sqlglot-go#10, so the new packages resolve without a local replacement. Merge the sqlglot dependency PR first. Validation: all 10 tracked database Gavel fixture gates pass, including SQLite API/cache compatibility, existing PostgreSQL bundle/view-dependency migrations, and the standalone native engine suite. Unrelated Git, query, and connection changes are excluded from this commit. Gavel-Issue-Id: e5e4b378-75e4-4291-9c72-585d138a7cef
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
commons-dbintosqlglot-go/database;commons-dbkeeps typed compatibility shimsschema inspectandmigrate plan/applyCLI, plus read-only script analysisNotes