001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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    }