<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mysql on Devops Monk</title><link>https://devops-monk.com/tags/mysql/</link><description>Recent content in Mysql on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 03 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/mysql/index.xml" rel="self" type="application/rss+xml"/><item><title>Changelog Formats: XML, YAML, JSON, and SQL — When to Use Each</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-changelog-formats/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-changelog-formats/</guid><description>Liquibase supports four changelog formats: XML, YAML, JSON, and SQL. The format you pick affects readability, tooling support, and what features are available. This article shows the same changeset in all four formats so you can compare them directly — then explains when each format is the right choice.
The Same Change in All Four Formats To make comparison concrete, here is a single changeset — creating the users table from the e-commerce schema — written in every format.</description></item><item><title>Changelog Organization: Master Files, include/includeAll, Directory Structures</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-changelog-organization/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-changelog-organization/</guid><description>A single changelog file works fine for a tutorial. It stops working the moment two developers add migrations on the same day, or when you need to find the changeset that introduced a column added six months ago, or when a feature branch&amp;rsquo;s migrations must be reviewed independently before merging.
Changelog organization is not a polish step — it is what determines whether Liquibase stays manageable at scale or turns into a source of merge conflicts and mystery failures.</description></item><item><title>Common Migration Patterns: 12 Real-World Schema Changes with MySQL</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-migration-patterns/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-migration-patterns/</guid><description>Most Liquibase guides explain change types by listing them. This article is different — it walks through twelve patterns you will encounter repeatedly in a real project, explains the MySQL-specific behaviour of each, and shows the rollback you need to write alongside every change.
All examples build on the ecommerce database established in Part 1. By the end, you will have a complete reference you can reach for on any working day.</description></item><item><title>Contexts and Labels: Multi-Environment Filtering</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-contexts-labels/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-contexts-labels/</guid><description>The most common multi-environment problem in database migrations: seed data that should run in dev and staging but must never touch production. The naive solution is maintaining separate changelogs per environment. The correct solution is contexts and labels — Liquibase&amp;rsquo;s built-in filtering mechanism that lets a single changelog serve every environment.
This article covers both features, explains the critical difference between them, and shows exactly how to wire them into Spring Boot profiles.</description></item><item><title>Core Commands: update, rollback, status, history, validate, diff</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-core-commands/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-core-commands/</guid><description>Liquibase has over 50 commands. In practice, you will use fewer than ten of them for 95% of your work. This article covers those ten commands — what each one does, when to reach for it, and what the output tells you. Every example builds on the ecommerce database and users table from Article 4.
The commands are organized by what you&amp;rsquo;re trying to accomplish: inspect, apply, undo, and verify.</description></item><item><title>Core Concepts: Changelog, Changeset, and Tracking Tables</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-core-concepts/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-core-concepts/</guid><description>Before writing a single migration, you need the mental model. Understanding how Liquibase thinks about changelogs, changesets, and identity prevents the most common mistakes — ones that are painful to fix after deployment.
The Changelog The changelog is the file Liquibase reads. It contains an ordered list of changesets. Think of it as your database&amp;rsquo;s Git history — a sequential record of every change ever made.
# db/changelog/db.changelog-master.yaml databaseChangeLog: - changeSet: id: &amp;#34;20240101-001&amp;#34; author: abhay changes: - createTable: tableName: users columns: - column: name: id type: BIGINT autoIncrement: true constraints: primaryKey: true nullable: false - changeSet: id: &amp;#34;20240101-002&amp;#34; author: abhay changes: - addColumn: tableName: users columns: - column: name: email type: VARCHAR(255) constraints: nullable: false unique: true The changelog format (YAML, XML, SQL) doesn&amp;rsquo;t matter for understanding the concept — it&amp;rsquo;s always a list of changesets in order.</description></item><item><title>Diff, Snapshot, and Reverse Engineering: Onboarding Existing Databases</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-diff-reverse-engineering/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-diff-reverse-engineering/</guid><description>Most Liquibase tutorials start with a blank database. Most real projects start with a production database that has been evolving for years without version control. This article covers the complete workflow for adopting Liquibase on an existing database — generating a baseline changelog, bootstrapping Liquibase tracking, detecting drift between environments, and maintaining snapshots for offline comparisons.
The Onboarding Problem An existing database has no DATABASECHANGELOG table. Running liquibase update with a fresh changelog would try to create tables that already exist, causing immediate failures.</description></item><item><title>Introduction: Why Database Versioning Matters</title><link>https://devops-monk.com/tutorials/liquibase/introduction-to-liquibase/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/introduction-to-liquibase/</guid><description>Your application code is in Git. Every change is tracked, reviewed, and reversible. Your database schema is not — it lives in someone&amp;rsquo;s head, a shared wiki page, or a folder of SQL scripts with names like fix_final_v3.sql. This is the problem Liquibase solves.
The Problem: Database Drift On a typical team without database versioning:
Developer A adds a column locally and forgets to tell anyone Developer B&amp;rsquo;s tests fail on a table that exists on A&amp;rsquo;s machine but not on B&amp;rsquo;s Staging has 3 extra columns that production doesn&amp;rsquo;t — or vice versa Nobody knows what the &amp;ldquo;correct&amp;rdquo; schema state is Deploying to production means manually running SQL scripts while hoping nothing was missed This is database drift — the schema diverges between environments and nobody tracks when or why.</description></item><item><title>MySQL-Specific Patterns: Character Sets, Engines, Large Table Migrations</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-mysql-specific-patterns/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-mysql-specific-patterns/</guid><description>Liquibase&amp;rsquo;s change types generate standard SQL. MySQL has quirks — character set requirements that differ from the standard, a storage engine option absent from other databases, row format constraints that affect index key length, and DDL locking behaviour that makes a 10-second table lock acceptable in dev and catastrophic in production.
This article covers the MySQL-specific patterns that you will need once you move from tutorial projects to real production databases.</description></item><item><title>Preconditions: Guard Your Migrations with tableExists, sqlCheck, and More</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-preconditions/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-preconditions/</guid><description>A migration assumes the database is in a specific state. It assumes the table it references exists, the column it modifies is the right type, the user running it has the right privileges, and the database is the right engine. When those assumptions are violated — a hotfix was applied manually, a migration ran out of order, someone ran the wrong changelog against the wrong database — the migration fails in a way that can be hard to diagnose.</description></item><item><title>Property Substitution: Environment-Specific Values in Changelogs</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-property-substitution/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-property-substitution/</guid><description>A changeset that hard-codes the schema name ecommerce works in production but breaks when your staging database is called ecommerce_staging. A changeset that seeds a specific admin email works in dev but shouldn&amp;rsquo;t run with the same value in staging. Property substitution lets you parameterize these values so one changelog serves every environment.
How Property Substitution Works Liquibase replaces ${property-name} tokens in your changelog with the value assigned to that property before executing any SQL.</description></item><item><title>Rollback in Production: Tag-Based Strategies and CI Validation</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-production-rollback/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-production-rollback/</guid><description>Article 9 covered what rollback commands exist. This article covers how to make rollback reliable in production — where a slow or broken rollback costs real money and real users. The difference between knowing the commands and having a working rollback strategy is process: mandatory tagging, pre-generated rollback files, CI gates, and a decision tree that removes guesswork during an incident.
Why Rollback Fails in Production Rollback failures in production share a small set of root causes:</description></item><item><title>Rollback Strategies: Automatic, Custom, Tag-Based, and Count-Based</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-rollback-strategies/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-rollback-strategies/</guid><description>Rollback is the thing you build at 2am when the deployment broke production. The problem is that 2am is exactly the wrong time to discover your rollback blocks are missing, incomplete, or untested.
This article covers rollback from a strategy perspective: how Liquibase generates rollback, when you must write it yourself, how to handle change types that cannot be rolled back at all, and how to validate your rollback strategy in CI so it works when you need it.</description></item><item><title>Spring Boot Integration: Zero-Config Setup and Full Properties Reference</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-spring-boot-integration/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-spring-boot-integration/</guid><description>Running Liquibase from the CLI is fine for learning and for standalone scripts. In a real Spring Boot application, you want migrations to run automatically at startup — before the application code touches the database. Spring Boot&amp;rsquo;s Liquibase auto-configuration handles this with zero boilerplate: add the dependency, point to your changelog, and migrations run before the application context is ready.
This article covers the complete integration: Maven/Gradle setup, how auto-run works and why, the full spring.</description></item><item><title>Stored Procedures, Views, and Triggers in MySQL</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-stored-objects-mysql/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-stored-objects-mysql/</guid><description>Tables and columns are straightforward in Liquibase — one change type per operation, automatic rollback, clean history. Stored procedures, views, and triggers are different. They contain body SQL that uses semicolons internally, which conflicts with Liquibase&amp;rsquo;s default statement splitting. They are replaced rather than altered. And unlike tables, modifying them frequently over time is expected.
This article covers the mechanics and patterns that make stored objects manageable in Liquibase.
The Core Problem: Delimiter Conflicts A stored procedure body contains semicolons to terminate each statement inside it:</description></item><item><title>Team Collaboration: Naming Conventions, Conflict Prevention, Git Workflow</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-team-collaboration/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-team-collaboration/</guid><description>A solo developer can treat Liquibase conventions as suggestions. A team of five cannot. When two developers both write &amp;ldquo;the next migration&amp;rdquo; on the same day, without a convention that prevents collision, you get duplicate IDs, merge conflicts on the master changelog, or — worst case — two changesets that silently overwrite each other in DATABASECHANGELOG.
This article is the operating agreement for teams using Liquibase: what conventions to establish, how to structure the git workflow, what the PR review checklist looks like, and what to do when conflicts happen despite the conventions.</description></item><item><title>Your First Migration: MySQL Setup and Running liquibase update</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-first-migration/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-first-migration/</guid><description>You&amp;rsquo;ve read about changesets, tracking tables, and changelog formats. Now you&amp;rsquo;re going to run your first real migration against a live MySQL database. By the end of this article you will have connected Liquibase to MySQL, written a changelog that creates the users table for our e-commerce app, previewed the SQL it generates, applied it, and verified the result in the database.
This is the article where things become real.</description></item><item><title>Zero-Downtime Deployments: The Expand-Contract Pattern</title><link>https://devops-monk.com/tutorials/liquibase/liquibase-zero-downtime-deployments/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/liquibase/liquibase-zero-downtime-deployments/</guid><description>A RENAME COLUMN statement takes milliseconds. But if your application is still running the old code when the rename executes, every query that uses the old column name fails immediately. Zero-downtime schema changes are not about making DDL faster — they are about sequencing changes so that no single step breaks the running application.
The expand-contract pattern is the standard solution. It breaks dangerous migrations into safe, incremental phases that allow old and new application code to coexist with the same database during deployment.</description></item></channel></rss>