Safeguard Your Production Migrations with Liquibase Preconditions
Use Liquibase preconditions to check database state before applying migrations. Learn how to embed them, test with --dryRun, and avoid common pitfalls in this concise guide.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use Liquibase preconditions to check database state before applying migrations. Learn how to embed them, test with --dryRun, and avoid common pitfalls in this concise guide.
Heroku's release phase runs migrations automatically between build and traffic shift, turning a forgotten manual step into a deploy-blocking safety gate. Here's how to set it up and where its limits are.
Learn how Liquibase preconditions guard migrations against duplicate changes, with a real example, trade‑offs, and best practices to keep your database in the expected state.
Use one master changelog with contexts for environment gating and preconditions for state assumptions. Keep DATABASECHANGELOG as the source of truth and plan for locks, partial DDL, and precondition masking.
Use Knex.js migrations to version schema changes in Node.js with timestamped up and down functions, tracked in knex_migrations, and verify with migrate:latest and rollback.
Magento 2 Declarative Schema replaces procedural upgrade scripts with idempotent XML declarations. This guide covers the mechanism, a worked example for a custom order table, whitelist protection, data patches, and practical limits like type changes and large-table locks.
Learn how Liquibase contexts let you maintain a single changelog while applying environment‑specific changesets safely, with a concrete example, verification steps, and trade‑offs.
Formatted SQL keeps migrations in plain SQL while Liquibase handles tracking, preconditions and rollback — provided you declare rollback and keep applied changesets immutable.
CodeIgniter 4's built-in migration system gives teams a lightweight, CLI-driven way to version database schemas. This post walks through the workflow, namespaced migrations, a concrete example, rollback caveats, and CI/CD integration patterns.