001    /**
002     * Copyright (c) 2000-2013 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.v6_1_0;
016    
017    import com.liferay.portal.kernel.upgrade.UpgradeProcess;
018    
019    /**
020     * @author Kenneth Chang
021     */
022    public class UpgradeCountry extends UpgradeProcess {
023    
024            @Override
025            protected void doUpgrade() throws Exception {
026                    for (String name : _NAMES) {
027                            runSQL(
028                                    "update Country set zipRequired = FALSE where name = '" + name +
029                                            "'");
030                    }
031            }
032    
033            private static final String[] _NAMES = {
034                    "Angola", "Antigua", "Aruba", "Bahamas", "Belize", "Benin", "Botswana",
035                    "Burkina Faso", "Burundi", "Central African Republic", "Comoros",
036                    "Republic of Congo", "Democratic Republic of Congo", "Cook Islands",
037                    "Djibouti", "Dominica", "Equatorial Guinea", "Eritrea", "Fiji Islands",
038                    "Gambia", "Ghana", "Grenada", "Guinea", "Guyana", "Ireland", "Kiribati",
039                    "North Korea", "Macau", "Malawi", "Mali", "Mauritania", "Mauritius",
040                    "Montserrat", "Nauru", "Niue", "Qatar", "Rwanda", "St. Kitts",
041                    "St. Lucia", "Sao Tome & Principe", "Seychelles", "Sierra Leone",
042                    "Solomon Islands", "Somalia", "Suriname", "Syria", "Tanzania", "Tonga",
043                    "Trinidad & Tobago", "Tuvalu", "Uganda", "United Arab Emirates",
044                    "Vanuatu", "Yemen", "Zimbabwe"
045            };
046    
047    }