import com.liferay.portlet.PortletPreferencesFactoryUtil;
import javax.portlet.PortletPreferences;
public class UpgradeDocumentLibrary extends BaseUpgradePortletPreferences {
@Override
protected void doUpgrade() throws Exception {
<BUG>try {
runSQL("alter_column_type DLFileEntry name VARCHAR(255) null");
}
catch (Exception e) {
UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(</BUG>
DLFileEntryTable.TABLE_NAME, DLFileEntryTable.TABLE_COLUMNS);

import com.liferay.portlet.PortletPreferencesFactoryUtil;
import javax.portlet.PortletPreferences;
public class UpgradeDocumentLibrary extends BaseUpgradePortletPreferences {
@Override
protected void doUpgrade() throws Exception {
if (isSupportsAlterColumnType()) {
runSQL("alter_column_type DLFileEntry name VARCHAR(255) null");
runSQL("alter_column_type DLFileRank name VARCHAR(255) null");
runSQL("alter_column_type DLFileShortcut toName VARCHAR(255) null");
runSQL("alter_column_type DLFileVersion name VARCHAR(255) null");
}
else {
UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
DLFileEntryTable.TABLE_NAME, DLFileEntryTable.TABLE_COLUMNS);
