I am getting the following error while running liquibase Update on MYSQL
Error:
Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.1:update (default-cli) on project liqui-demo: Error setting up or running Liquibase: Migration failed for change set src/main/resources/initialSchema.xml::0.0_3::Salil:
[ERROR] Reason: liquibase.exception.DatabaseException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1 [Failed SQL: DELIMITER]
[ERROR]
Script:
DELIMITER ;;
CREATE FUNCTION `functionname`(
Idname BIGINT(20)
) RETURNS bit(1)
BEGIN
Pom file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion>
<groupId>com.salil.liquibase</groupId>
<artifactId>liqui-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>liqui-demo</name>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
<propertyFile>src/main/resources/param.properties</propertyFile>
<migrationSqlOutputFile>
${project.build.directory}/liquibase/migrate-${projectname.dbName}-${projectname.environment}.sql
</migrationSqlOutputFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>update</id>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>rollback</id>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>rollback</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>tag</id>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>tag</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>