Issue
`I have already running project and trying to introduce liquibase in middle of project. This is spring boot maven based project.
1.liquibase.properties
url=jdbc:postgresql://localhost:5432/cc
username=postgres
password=deadline123
driver=org.postgresql.Driver
outputChangeLogFile=src/main/resources/db/changelog/db.changelog-master.yaml
runOnChange=true
referenceUrl=jdbc:postgresql://localhost:5432/cc
referenceUsername=postgres
referencePassword=deadline123
changelogFile=src/main/resources/db/changelog/db.changelog-master.yaml
diffChangeLogFile=src/main/resources/diff.yaml
- Run command to generate changelog for current DB state
mvn liquibase:generateChangeLog
- Then run command to sync changelog and create entry in DB
mvn liquibase:changelogSync
- Starting my application but it's throwing error relation already exist. I can't figure out why liquibase is executing already executed changeset? I am using liquibase 4.6.3
Solution
Issue was with file path src/main/resources/db/changelog/db.changelog-master.yaml
liquibase:changelogSync
adds file path as above in log sync and liquibae
on start actually takes classpath
classpath:/db/changelog/db.changelog-master.yaml
Answered By - Jay Prakash
Answer Checked By - Clifford M. (JavaFixing Volunteer)