diff --git a/build.gradle b/build.gradle
index e7540a9f5..1fa195e85 100644
--- a/build.gradle
+++ b/build.gradle
@@ -38,6 +38,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'javax.cache:cache-api'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api'
+ implementation 'org.springframework.boot:spring-boot-starter-liquibase'
runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator'
runtimeOnly "org.webjars:webjars-locator-lite:${webjarsLocatorLiteVersion}"
runtimeOnly "org.webjars.npm:bootstrap:${webjarsBootstrapVersion}"
diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties
new file mode 100644
index 000000000..22df004ec
--- /dev/null
+++ b/src/main/resources/application-dev.properties
@@ -0,0 +1 @@
+spring.liquibase.contexts=dev
diff --git a/src/main/resources/application-mysql.properties b/src/main/resources/application-mysql.properties
index e23dfa605..870ba8444 100644
--- a/src/main/resources/application-mysql.properties
+++ b/src/main/resources/application-mysql.properties
@@ -4,4 +4,4 @@ spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/petclinic}
spring.datasource.username=${MYSQL_USER:petclinic}
spring.datasource.password=${MYSQL_PASS:petclinic}
# SQL is written to be idempotent so this is safe
-spring.sql.init.mode=always
+spring.sql.init.mode=never
diff --git a/src/main/resources/application-postgres.properties b/src/main/resources/application-postgres.properties
index b265d7e5b..39ba0315c 100644
--- a/src/main/resources/application-postgres.properties
+++ b/src/main/resources/application-postgres.properties
@@ -4,4 +4,4 @@ spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost/petclinic}
spring.datasource.username=${POSTGRES_USER:petclinic}
spring.datasource.password=${POSTGRES_PASS:petclinic}
# SQL is written to be idempotent so this is safe
-spring.sql.init.mode=always
+spring.sql.init.mode=never
diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties
new file mode 100644
index 000000000..c79578136
--- /dev/null
+++ b/src/main/resources/application-prod.properties
@@ -0,0 +1 @@
+spring.liquibase.contexts=prod
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 630c1145a..32b0b411b 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,7 +1,10 @@
# database init, supports mysql too
-database=h2
-spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
-spring.sql.init.data-locations=classpath*:db/${database}/data.sql
+#database=h2
+#spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
+#spring.sql.init.data-locations=classpath*:db/${database}/data.sql
+
+# --- Liquibase ---
+spring.liquibase.change-log=classpath:db/changelog/db.changelog-master.xml
# Web
spring.thymeleaf.mode=HTML
@@ -21,6 +24,7 @@ management.endpoints.web.exposure.include=*
logging.level.org.springframework=INFO
# logging.level.org.springframework.web=DEBUG
# logging.level.org.springframework.context.annotation=TRACE
+logging.level.liquibase=INFO
# Maximum time static resources should be cached
spring.web.resources.cache.cachecontrol.max-age=12h
diff --git a/src/main/resources/db/changelog/001-schema.xml b/src/main/resources/db/changelog/001-schema.xml
new file mode 100644
index 000000000..062d6a762
--- /dev/null
+++ b/src/main/resources/db/changelog/001-schema.xml
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/db/changelog/002-data-dev.xml b/src/main/resources/db/changelog/002-data-dev.xml
new file mode 100644
index 000000000..4df0b5056
--- /dev/null
+++ b/src/main/resources/db/changelog/002-data-dev.xml
@@ -0,0 +1,311 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/db/changelog/db.changelog-master.xml b/src/main/resources/db/changelog/db.changelog-master.xml
new file mode 100644
index 000000000..af75f3697
--- /dev/null
+++ b/src/main/resources/db/changelog/db.changelog-master.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+