001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.upgrade.v4_3_3;
016    
017    import com.liferay.portal.kernel.upgrade.UpgradeProcess;
018    import com.liferay.portal.kernel.upgrade.util.UpgradeTable;
019    import com.liferay.portal.kernel.upgrade.util.UpgradeTableFactoryUtil;
020    import com.liferay.portal.upgrade.v4_3_3.util.SCFrameworkVersionTable;
021    import com.liferay.portal.upgrade.v4_3_3.util.SCLicenseTable;
022    import com.liferay.portal.upgrade.v4_3_3.util.SCProductEntryTable;
023    import com.liferay.portal.upgrade.v4_3_3.util.SCProductVersionTable;
024    
025    /**
026     * @author Brian Wing Shun Chan
027     */
028    public class UpgradeSoftwareCatalog extends UpgradeProcess {
029    
030            protected void doUpgrade() throws Exception {
031    
032                    // SCFrameworkVersion
033    
034                    UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
035                            SCFrameworkVersionTable.TABLE_NAME,
036                            SCFrameworkVersionTable.TABLE_COLUMNS);
037    
038                    upgradeTable.setCreateSQL(SCFrameworkVersionTable.TABLE_SQL_CREATE);
039    
040                    upgradeTable.updateTable();
041    
042                    // SCLicense
043    
044                    upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
045                            SCLicenseTable.TABLE_NAME, SCLicenseTable.TABLE_COLUMNS);
046    
047                    upgradeTable.setCreateSQL(SCLicenseTable.TABLE_SQL_CREATE);
048    
049                    upgradeTable.updateTable();
050    
051                    // SCProductEntry
052    
053                    upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
054                            SCProductEntryTable.TABLE_NAME, SCProductEntryTable.TABLE_COLUMNS);
055    
056                    upgradeTable.setCreateSQL(SCProductEntryTable.TABLE_SQL_CREATE);
057    
058                    upgradeTable.updateTable();
059    
060                    // SCProductVersion
061    
062                    upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
063                            SCProductVersionTable.TABLE_NAME,
064                            SCProductVersionTable.TABLE_COLUMNS);
065    
066                    upgradeTable.setCreateSQL(SCProductVersionTable.TABLE_SQL_CREATE);
067    
068                    upgradeTable.updateTable();
069            }
070    
071    }