Skip to content

Liquibase Migration Standardization Completed

Liquibase Migration Standardization - Completed

Section titled “Liquibase Migration Standardization - Completed”

All Liquibase database migrations have been successfully standardized to use YAML format instead of XML. This migration was completed to improve readability, maintainability, and modernize the database schema management approach.

The following XML files were converted to YAML:

  • master.xmlmaster.yaml (already existed)
  • 001-initial-schema.xml001-initial-schema.yaml (already existed)
  • 002-additional-tables.xml002-additional-tables.yaml (converted)
  • 003-versioning-and-rollback.xml003-versioning-and-rollback.yaml (converted)

All XML migration files have been deleted from the project:

  • ✅ Removed master.xml
  • ✅ Removed 001-initial-schema.xml
  • ✅ Removed 002-additional-tables.xml
  • ✅ Removed 003-versioning-and-rollback.xml

The application configuration (application.yml) is correctly pointing to the YAML master file:

spring:
liquibase:
change-log: classpath:db/changelog/master.yaml
enabled: true
src/main/resources/db/changelog/
├── master.yaml
└── migrations/
├── 001-initial-schema.yaml
├── 002-additional-tables.yaml
└── 003-versioning-and-rollback.yaml
  1. Improved Readability: YAML is more human-readable with less syntactic noise
  2. Better Comments: YAML’s comment syntax (#) makes documentation easier
  3. Less Verbose: Shorter files with cleaner structure
  4. Modern Approach: Aligns with modern DevOps and configuration practices
  5. Consistency: Matches the project’s use of YAML for application configuration
  • ✅ All XML files removed successfully
  • ✅ All YAML files created and properly formatted
  • ✅ Project compiles without errors
  • ✅ Application configuration correctly references YAML master file
  • ✅ No XML dependencies remaining in the database migration system

All migration functionality has been preserved during the conversion:

  1. Initial Schema (001): Users, roles, and user_roles tables with proper relationships
  2. Additional Tables (002): Refresh tokens and user preferences tables
  3. Versioning and Rollback (003): Database versioning table and rollback procedures

The migration maintains all:

  • Table structures
  • Constraints (primary keys, foreign keys, unique constraints)
  • Indexes
  • Default values
  • Rollback procedures
  • Initial data inserts

The Liquibase migration standardization is complete. Future database migrations should:

  1. Use YAML format for consistency
  2. Follow the established naming convention (00X-description.yaml)
  3. Include proper rollback procedures where applicable
  4. Add appropriate comments for complex migrations

When ready to test, run the application to ensure the YAML migrations execute correctly:

Terminal window
./gradlew :server:thryve:bootRun

The application will automatically apply any pending migrations on startup.