using liquibase inside a spring boot project in combination with the liquibase maven plugin.
I'v added the following changeset:
<changeSet author="mrx" id="1642181924202-55">
<addColumn tableName="users" >
<column name="email"
type="varchar(255)">
</column>
</addColumn>
</changeSet>
The liquibase properties:
url=jdbc:mysql://db:3306/mydb
username=root
classpath=mysql-connector-java-8.0.12.jar
password=test
ChangeLogFile=liquibaseChangeLog.xml
driver=com.mysql.cj.jdbc.Driver
outputChangeLogFile=src/main/resources/liquibaseChangeLog.xml
diffExcludeObjects=table:ACT_.*
logLevel=finest
diffTypes=data,tables,views,columns,indexes,foreignkeys,primarykeys,uniqueconstraints
in application.yaml of spring boot:
liquibase:
change-log: classpath:liquibaseChangeLog.xml
And then I'm running from intellij the maven liquibase plugin action "update" but the table is not altered and the changelog does not contain the -55 id so it is not used.
The changelog was generated before from an existing DB, this worked and when I delete the whole DB liquibase recreates it. Only cannt add one simple column here by hand.
How can I get this to work? Is my changeset missing some info? (I deleted parameters schema and catalog, seemed like I did not need them and I wouldnt know what to fill in, the id is just the same as the last generated one +1) That the changeset adds actually a simple column like this.
ok, I ran all the time liquibase update and it did not work but after I simply build the project and started the spring boot app, the changelog was applied correctly. :/