Affects Version/s: 6.1.0 CE GA1, 6.1.10 EE GA1, 6.2.0 CE M2
Environment:SQL Server 2008, Tomcat
If there are SQL Server System Tables present in a database, Liferay will sometimes try to upgrade the pseudo-system database table and will throw an error.
Steps to reproduce:
1. Need pseudo-system tables in the database System Tables section
This can be done by setting up some kind of system database mail.
Liferay will try to upgrade it and get a messaged like:
15:38:03,231 INFO [VerifySQLServer:130] Updating sysmail_mailitems.recipients to use nvarchar
15:38:03,262 ERROR [VerifySQLServer:88] java.sql.SQLException: Incorrect syntax near ')'.
java.sql.SQLException: Incorrect syntax near ')'.
sysmail_mailitems is not a Liferay table.
depending on the tables present, other sys tables will be upgraded.
Possible solution is to update the filter that determines which tables to alter and have it include 'AND (sysobjects.category != 2)' as pseudo-system tables have that category value.