It’s Time to Automate Your Database Schema Changes

Robert Reeves
CTO

Let’s remember why we use Artifactory in the first place! We need a single source of truth. Of course, we have that with our source code control but that’s not the best place to put our applications that are ready for release. Artifactory provides a mechanism for anyone in the organization to request the latest released version of an application and also include any dependencies required by the new application version. However, most of you are not including the database schema changes. If you’re including your database as part of your architecture, why aren’t you including it as an artifact? This oversight causes serious problems. Cramming SQL scripts into Artifactory isn’t the answer. It’s time to automate your database schema change process. Anyone can do this. I’ll demonstrate how you can use an open source tool called Liquibase to make database schema available for test environments. If you have a lot of database migrations to develop, your integration test environments should automatically be in sync with the defined migrations. The most efficient way to handle this is to let Jenkins push the Liquibase defined ChangeLog (whether XML, YAML, JSON, or annotated SQL) to your internal Artifactory. Thus, your application and dependent database changes will be part of a distinct, atomic release.

Try JFrog For Free!