Liquibase migration error
11:03:23,704 main WARN AnnotationConfigWebApplicationContext:558 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseMigration' defined in org.gringlobal.application.config.DatabaseConfig: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/liquibase-changeLog.yml::1591376792000-2::mobreza:
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 'delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; in' at line 1 [Failed SQL: (1064) delete from oauthclientrole; delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select sys_user_id, 1, 1, iif(is_enabled = 'Y', 1, 0), 1, user_name, created_date, modified_date from sys_user);
declare @max_sid bigint; select @max_sid = max(id) from acl_sid; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select web_user_id + @max_sid, 3, 1, 1, 1, user_name, created_date, modified_date from web_user); set identity_insert acl_sid off;]
11:03:23,721 main ERROR ContextLoader:313 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseMigration' defined in org.gringlobal.application.config.DatabaseConfig: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/liquibase-changeLog.yml::1591376792000-2::mobreza:
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 'delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; in' at line 1 [Failed SQL: (1064) delete from oauthclientrole; delete from oauthclient; delete from acl_sid;
set identity_insert acl_sid on; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select sys_user_id, 1, 1, iif(is_enabled = 'Y', 1, 0), 1, user_name, created_date, modified_date from sys_user);
declare @max_sid bigint; select @max_sid = max(id) from acl_sid; insert into acl_sid (id, type, version, active, principal, sid, createdDate, lastModifiedDate) (select web_user_id + @max_sid, 3, 1, 1, 1, user_name, created_date, modified_date from web_user); set identity_insert acl_sid off;]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
cc @mobreza