Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new file-based SQL migrator (GH-96) that can apply ordered *.sql scripts from a classpath index file, track applied scripts with checksums in sqiffy_metadata, and optionally import existing Liquibase state to support seamless cutovers.
Changes:
- Introduces
FileMigratorwith checksum drift policies and optional one-time Liquibase state import. - Adds supporting components:
ChangelogIndex(index parsing + path resolution),ChangelogLedger(metadata-backed ledger), and a pluggableResourceLoader. - Adds end-to-end tests + test migration resources, and extends migration docs to cover the new migrator.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/SqiffyMigrator.kt |
Adjusts metadata key column declaration/comment to accommodate file-migrator ledger keys. |
sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/ResourceLoader.kt |
Adds resource loading abstraction (classpath default) for migration index/scripts. |
sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt |
Implements the new file-based migrator, checksum policy handling, and Liquibase import. |
sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/ChangelogLedger.kt |
Implements reading/writing applied-changeset ledger entries in sqiffy_metadata. |
sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/ChangelogIndex.kt |
Implements parsing and resolving migration paths from an index file; adds checksum helpers. |
sqiffy-test/src/test/resources/filemigrator/changelog.index |
Adds test changelog index manifest for file migrator E2E coverage. |
sqiffy-test/src/test/resources/filemigrator/1.0.0/001-create-users.sql |
Adds test migration script 001. |
sqiffy-test/src/test/resources/filemigrator/1.0.0/002-add-email.sql |
Adds test migration script 002. |
sqiffy-test/src/test/resources/filemigrator/1.0.0/003-add-counter-function.sql |
Adds multi-statement/dollar-quoted test migration script 003. |
sqiffy-test/src/test/kotlin/com/dzikoysk/sqiffy/e2e/FileMigratorE2ETest.kt |
Adds E2E tests for idempotency, checksum drift policies, and Liquibase import scenarios. |
sqiffy-docs/guide/migrations.md |
Documents the new file migrator and Liquibase cutover flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploying sqiffy-docs with
|
| Latest commit: |
7faa586
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6ebaa884.sqiffy-docs.pages.dev |
| Branch Preview URL: | https://gh-96.sqiffy-docs.pages.dev |
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.
No description provided.