Skip to content

ADR: DBMigrationStrategy: Job-Based Schema Migration Design - #31

Open
mathecruz wants to merge 3 commits into
kubesmarts:mainfrom
mathecruz:migrator-app-dedicated-repo-adr
Open

mathecruz wants to merge 3 commits into
kubesmarts:mainfrom
mathecruz:migrator-app-dedicated-repo-adr

Conversation

@mathecruz

@mathecruz mathecruz commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

This pull request aims to proposal a solution to solve the #25.

@mathecruz
mathecruz marked this pull request as draft August 26, 2026 00:41
@mathecruz
mathecruz marked this pull request as ready for review August 26, 2026 14:41

@ricardozanini ricardozanini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additionally, we should:

  1. Create a new LogicFlowDBMigration type that will reconcile the objects to deploy the job
  2. The status field of this new CR will reflect the actual DB state (version, last modified time, etc)
  3. It should be one CR per platform/runtime since it will target specific schemas
  4. Think on how the matrix of schemas/components will work. For example, we can have a db migration per runtime, per platform, distributed accross 3 components (runtime, DI, and Quartz). Perhaps the migration strategy should be tied only to the platform, not runtime to not overengineer the solution.

Comment thread adr/implementation/db-migration-strategy.md Outdated
@mathecruz
mathecruz force-pushed the migrator-app-dedicated-repo-adr branch from d726822 to f812aa1 Compare August 27, 2026 21:02
@mathecruz mathecruz changed the title ADR: DB migration strategy ADR; DBMigrationStrategy: Job-Based Schema Migration Design Sep 1, 2026
@mathecruz mathecruz changed the title ADR; DBMigrationStrategy: Job-Based Schema Migration Design ADR: DBMigrationStrategy: Job-Based Schema Migration Design Sep 1, 2026
@ricardozanini

Copy link
Copy Markdown
Contributor

@mcruzdev any updates?

@mathecruz

Copy link
Copy Markdown
Member Author

Hi @ricardozanini, sorry. This one currently is blocked by quarkiverse/quarkus-flow#895 which needs to be accepted and implemented.

@mathecruz

Copy link
Copy Markdown
Member Author

@ricardozanini the ADR there are 3 steps, we can implement step-by-step. Once it merged, I can create all issues and to track all the whole progress through issues. Basically we need:

  • Step 1: runtime schema migration
  • Step 2: Publish data index migration extension
  • Step 3: Publish quarkus-flow-db-migration extension

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical design and safety issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 7 High severity · 5 Medium severity

Open (12)
What changed in this PR

This PR proposes a platform-owned, Job-based database migration architecture for runtime, Data Index, and Quartz schemas.

Changes:

  • Defines migration strategies and ownership semantics.
  • Proposes the LogicDbMigration CRD, controller, Job lifecycle, status, and RBAC.
  • Adds runtime migration gating and outlines phased delivery and testing.
File Review summary
adr/​implementation/​db-migration-strategy.md 7 critical and 5 moderate issues remain, including incomplete effective-configuration handling, unsafe Deployment and Job lifecycle behavior, missing watches and cleanup paths, CRD validation/status gaps, authorization concerns, concurrent migrations, and ambiguous Platform resolution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md Outdated
Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md
Comment thread adr/implementation/db-migration-strategy.md
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
@mathecruz
mathecruz force-pushed the migrator-app-dedicated-repo-adr branch from 781be38 to d04212c Compare September 24, 2026 10:18
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>

This branch has not been deployed

No deployments
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