Dear Team,
I have an error when generating database scripts to drop table:
2020-05-07 11:35:56.600 INFO [main] com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine - Executing script 60-tintin-ecommerce/update/mysql/20/200507-0-dropAddress.sql
- 2020-05-07 11:35:56.634 ERROR [main] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Error initializing application*
- java.lang.RuntimeException: *
- =================================================*
- ERROR: Data store update failed. See details below.*
- =================================================*
- Error executing SQL script 200507-0-dropAddress.sql*
- Can’t find file: ‘./mydb/myapp_address.frm’ (errno: 2 - No such file or directory)*
-
at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.executeSqlScript(DbUpdaterEngine.java:389) ~[cuba-core-7.2.4.jar:7.2.4]*
…
I check in my script file “200507-0-dropAddress.sql”:
"rename table myapp_address to MYAPP_ADDRESS__U70331 ; "
Problem here: My database unknow table with lower case letter:"myapp_address ".
Solution: I change table name to upper case letter then script run OK.
"rename table MYAPP_ADDRESS to MYAPP_ADDRESS__U70331 ; "