Database changelog structure to keep track of your database changes
This repository contains an example structure of keeping your database changelog and allowing automatic deployment of your changes to multiple servers and environments at any moment.
The changelog schema is recorded in the /build/database/changelog.xsd
file.
The changelog is separated in two files
changelog.xml
file which keeps all the versions andBased on the schema file, it tracks changes daily so that we can re-generate the database at any time.
In addition to the changelog, there is an extra folder called snapshots
which keep track of the different versions of the database as a full sql dump file.
The logic for using this database version history logger is to sync developers using virtual “tickets” for recording database changes. We can propose the following workflow:
version_history
table to get the next version