Issue
- An upgrade is failing with a
java.sql.SQLSyntaxErrorException: Table [table name] already existserror
Environment
- Quarterly Releases
- DXP 7.4
- DXP 7.3
- DXP 7.2
Resolution
NOTE: Be sure to take a backup of your database prior to making any changes. Always test the changes in a lower environment before making changes in production.
Making manual changes to the database is not recommended, and should be carefully assessed based on your own business needs and risk factors. Any such operation is performed at the sole discretion of your own team.
- Check the
schemaVersioncolumn of theRelease_table for an entry with a value of0.0.0. - In the pre-upgrade database, update the number to match the correct
schemaVersionfor that module your patch level (you can check the correctschemaVersionby selecting your patch level Downloads and opening the module version changelog).
Additional Information
- Modules with the release number
0.0.0trigger table creation. If a module has this number when an upgrade is run, Liferay will attempt to create tables and be unable to because the tables already exist.