Author Archives: Stanislav_Panteleev

Java.DBMigrationTools.How can you ensure a schema migration is idempotent?

Idempotent means: running the migration twice leaves the DB in the same final state (or the second run is a no-op). In strict tools like Flyway, versioned migrations normally run once, but idempotency still matters for: reruns after partial failures, … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How can you ensure a schema migration is idempotent?

Java.DBMigrationTools.How do you test migrations during pull request validation?

To validate migrations in a PR, you want two different guarantees: Correctness: migrations apply cleanly and produce the expected schema/data. Safety: they won’t brick prod (checksum edits, blocking DDL, non-idempotent backfills, etc.). Here’s what a solid PR pipeline looks like. … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you test migrations during pull request validation?

Java.DBMigrationTools.How do you support rollbacks in Flyway (if at all)?

Why Flyway avoids rollbacks DDL is often non-transactional (Postgres CREATE INDEX CONCURRENTLY, MySQL online DDL, etc.). Data migrations are irreversible (backfills, deletes, transforms). Automatic rollback scripts give a false sense of safety. Flyway chooses forward-only, auditable history over fragile reversibility. … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you support rollbacks in Flyway (if at all)?

Java.DBMigrationTools.How do you version control large changelog histories?

You version-control large changelog histories by treating them as immutable audit logs, then adding structure + baselines so new environments don’t have to replay 5 years of history every time. 1) Immutable history + “append-only” rules Never edit applied migrations; … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you version control large changelog histories?

Java.DBMigrationTools.How do you use migration tools in GitOps-based workflows?

In GitOps, the key shift is: Git is the desired state, and your CD controller (Argo CD / Flux) is the executor. So migrations must be declarative, repeatable, observable, and safe under retries. Core principles Immutable migrations: never edit an … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you use migration tools in GitOps-based workflows?

Java.DBMigrationTools.How do you detect and prevent duplicate changesets?

Duplicate changesets are mostly a process + CI guardrail problem. You detect them by validating metadata uniqueness and prevent them by naming conventions + automation. What “duplicate” means Liquibase A changeset is uniquely identified by the triple: (id, author, filePath) … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you detect and prevent duplicate changesets?

Java.DBMigrationTools.How do you debug a failed migration in a pipeline?

2) Check migration metadata tables (source of truth) This tells you whether it ran, failed, or got stuck. Flyway Query flyway_schema_history: success = false rows → failed migration installed_rank / version to see order checksum and execution_time for clues Liquibase … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you debug a failed migration in a pipeline?

Java.DBMigrationTools.What causes a checksum mismatch and how do you fix it?

Checksum mismatches happen when the migration tool detects that a migration it already recorded as “applied” is not byte-for-byte the same anymore. That’s a feature: it protects you from silently changing production history. What causes a checksum mismatch Flyway Flyway … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What causes a checksum mismatch and how do you fix it?

Java.DBMigrationTools.How would you structure your changelog/migration folder hierarchy?

Here are folder hierarchies I’d recommend (and why). I’ll give you two “battle-tested” layouts: one for Flyway (SQL-first) and one for Liquibase (master + includes). Both are designed to minimize merge conflicts, support multi-env, and keep things discoverable. Flyway folder … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How would you structure your changelog/migration folder hierarchy?

Java.DBMigrationTools.How do you create migrations for read replicas or sharded systems?

In read-replica or sharded setups, the “migration problem” isn’t writing SQL — it’s orchestration + safety: where you run it, in what order, how you handle heterogeneity, and how you keep the app compatible during the rollout. Read replicas Core … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you create migrations for read replicas or sharded systems?