Skip to content

GH-96 File-based migrator - #97

Merged
dzikoysk merged 6 commits into
mainfrom
GH-96
Jun 4, 2026
Merged

dzikoysk merged 6 commits into
mainfrom
GH-96

Conversation

@dzikoysk

@dzikoysk dzikoysk commented Jun 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 FileMigrator with checksum drift policies and optional one-time Liquibase state import.
  • Adds supporting components: ChangelogIndex (index parsing + path resolution), ChangelogLedger (metadata-backed ledger), and a pluggable ResourceLoader.
  • 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.

Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/SqiffyMigrator.kt Outdated
Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt Outdated
Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt Outdated
Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt Outdated
Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Deploying sqiffy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7faa586
Status: ✅  Deploy successful!
Preview URL: https://6ebaa884.sqiffy-docs.pages.dev
Branch Preview URL: https://gh-96.sqiffy-docs.pages.dev

View logs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt
Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt
Comment thread sqiffy-docs/guide/migrations.md

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread sqiffy/src/main/kotlin/com/dzikoysk/sqiffy/migrator/FileMigrator.kt
@dzikoysk
dzikoysk merged commit f82eb32 into main Jun 4, 2026
2 checks passed
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.

2 participants