Best practices for managing changelogs from different applications

498 Views Asked by At

We have an API application with 2 REST endpoints, and 2 separate applications writing (independent) tables to the same database to serve as backend for these 2 REST endpoints. You can think of this as an almost-microservices setup with shared DB server.

We want to use liquibase to manage the database tables from each of these 2 applications, but can't find any best practices guidelines about how to manage the changelog setup.

Options we are discussing:

  1. Each application maintains a separate changelog table, with records for the table it maintains.
  • Upside - completely independent setup, and sharing DB is co-incidental.
  • Downside - The changelog table numbers will increase as we add more tables / applications to feed to the same database. Need to remember which changelog to use for development and look at for debugging.
  1. Both applications share the same changelog table.
  • Upside - Single setup, can use the liquibase default. Easy lookup and maintainance.
  • Downside - Possible conflict / wait in case both applications try to deploy at the same time.

Can someone point me to best practices around this?

1

There are 1 best solutions below

0
On

This topic is explained in details in the Liquibase University Course https://learn.liquibase.com/catalog/info/id:131. Check out this Module 6 Tutorial - Managing Changelogs for a Shared Database for Multiple Teams in the course.