Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/namikazebadri/spring-boot-liquibase
Exploratory Project for Spring Boot + Liquibase
https://github.com/namikazebadri/spring-boot-liquibase
database-migrations liquibase spring-boot
Last synced: about 2 months ago
JSON representation
Exploratory Project for Spring Boot + Liquibase
- Host: GitHub
- URL: https://github.com/namikazebadri/spring-boot-liquibase
- Owner: namikazebadri
- Created: 2024-07-03T05:52:12.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T10:10:18.000Z (6 months ago)
- Last Synced: 2024-07-08T12:46:51.107Z (6 months ago)
- Topics: database-migrations, liquibase, spring-boot
- Language: Kotlin
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot Liquibase
This is a project to explore and demonstrate the use of liquibase as migration tools in a spring boot project.
This project consist of these points:1. Spring Boot and Liquibase setup
2. Creating table
3. Dropping table
4. Add unique constraint
5. Creating index
6. Dropping index
7. Add Column
8. Change column
9. Drop Column## Prepare Configuration
Set Environment variables for database connection (this is used by app when running):
```shell
DB_URL=
DB_SCHEMA=
DB_USERNAME=
DB_PASSWORD=
```Rename `gradle.properties.example` to `gradle.properties`, then set the values for database connection:
```properties
liquibaseDbUrl=
liquibaseDbUsername=
liquibaseDbPass=
liquibaseDbSchema=
```properties in `gradle.properties` used by liquibase migration, since we run migration in separate process from running application.
## Running Liquibase
We can run liquibase migration by executing this command:
```shell
./gradlew update
```