liquibase maven plugin multiple changeLogFile

Viewed 4010

I'm using liquibase maven plugin to update the database changes via jenkins automated builds.

I have this in my pom.xml

<plugin>
    <groupId>org.liquibase</groupId>
    <artifactId>liquibase-maven-plugin</artifactId>
    <version>3.4.2</version>
    <dependencies>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.5</version>
        </dependency>
    </dependencies>
    <configuration>
        <changeLogFile>${basedir}/src/main/resources/schema.sql</changeLogFile>
        <changeLogFile>${basedir}/src/main/resources/data.sql</changeLogFile>
        <driver>org.postgresql.Driver</driver>
        <url>jdbc:postgresql://${db.url}</url>
        <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
    </configuration>
</plugin>

I need to run schema.sql before data.sql. When I run this locally it works. When I run it via jenkins the schema changeLogFile executes second, so in order to make it work I reversed the commads.

Question: What's the order of execution? Am I doing something wrong?

1 Answers
Related