I just upgraded to platform 6.10 and tried to deploy to heroku. The application logs show a SQL error in file 180704-addNotNullForConfig.sql
. I found this file on my local system and was able to paste the contents into MySQL Workbench and successfully execute them. So I am not sure why there is a syntax error.
Where does this file come from? It is not part of my github repo. This is the contents of the file on my local machine, but I cannot confirm the deployed contents on heroku are the same:
-- add not null constraints for SYS_CONFIG
alter table SYS_CONFIG MODIFY NAME varchar(190) not null;
alter table SYS_CONFIG MODIFY VALUE_ text not null;
Is it possible to exclude this from running? Since I executed the 2 commands manually against the database, they should no longer be needed.
Here is a portion of the log where the error occurs.
2018-10-16T15:55:35.753415+00:00 app[web.1]: 15:55:35.753 INFO c.h.cuba.core.sys.MetadataImpl - Metadata initialized in 722 ms
2018-10-16T15:55:36.597927+00:00 app[web.1]: 15:55:36.597 INFO c.h.c.c.sys.dbupdate.DbUpdaterEngine - Updating database...
2018-10-16T15:55:37.022843+00:00 app[web.1]: 15:55:37.022 INFO c.h.c.c.sys.dbupdate.DbUpdaterEngine - Executing script 10-cuba/update/mysql/18/180704-addNotNullForConfig.sql
2018-10-16T15:55:37.115601+00:00 app[web.1]: 15:55:37.114 ERROR c.h.c.c.s.AbstractWebAppContextLoader - Error initializing application
2018-10-16T15:55:37.115605+00:00 app[web.1]: java.lang.RuntimeException:
2018-10-16T15:55:37.115608+00:00 app[web.1]: =================================================
2018-10-16T15:55:37.115609+00:00 app[web.1]: ERROR: Database update failed. See details below.
2018-10-16T15:55:37.115611+00:00 app[web.1]: =================================================
2018-10-16T15:55:37.115612+00:00 app[web.1]: Error executing SQL script 180704-addNotNullForConfig.sql
2018-10-16T15:55:37.115625+00:00 app[web.1]: 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 'alter table SYS_CONFIG MODIFY VALUE_ text not null' at line 4
2018-10-16T15:55:37.115628+00:00 app[web.1]: at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.executeSqlScript(DbUpdaterEngine.java:364) ~[cuba-core-6.10.1.jar:6.10.1]