[chronojump] Moved Cyprus to Europe



commit 8c6619acd05291ed958123de4e895d9a690407c0
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Nov 10 11:36:25 2014 +0100

    Moved Cyprus to Europe

 src/sqlite/country.cs |    5 +++--
 src/sqlite/main.cs    |   14 +++++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/sqlite/country.cs b/src/sqlite/country.cs
index ad80a7b..ef3e1b3 100644
--- a/src/sqlite/country.cs
+++ b/src/sqlite/country.cs
@@ -266,7 +266,6 @@ class SqliteCountry : Sqlite
                "Asia:" + "China:" + Catalog.GetString("China") + ":" + "CHN",
                "Asia:" + "Christmas Island:" + Catalog.GetString("Christmas Island") + ":" + "CXR",
                "Asia:" + "Cocos (Keeling) Islands:" + Catalog.GetString("Cocos (Keeling) Islands") + ":" + 
"CCK",
-               "Asia:" + "Cyprus:" + Catalog.GetString("Cyprus") + ":" + "CYP",
                "Asia:" + "Georgia:" + Catalog.GetString("Georgia") + ":" + "GEO",
                "Asia:" + "Hong Kong:" + Catalog.GetString("Hong Kong") + ":" + "HKG",
                "Asia:" + "India:" + Catalog.GetString("India") + ":" + "IND",
@@ -317,6 +316,7 @@ class SqliteCountry : Sqlite
                "Europe:" + "Bosnia and Herzegovina:" + Catalog.GetString("Bosnia and Herzegovina") + ":" + 
"BIH",
                "Europe:" + "Bulgaria:" + Catalog.GetString("Bulgaria") + ":" + "BGR",
                "Europe:" + "Croatia:" + Catalog.GetString("Croatia") + ":" + "HRV",
+               "Europe:" + "Cyprus:" + Catalog.GetString("Cyprus") + ":" + "CYP",
                "Europe:" + "Czech Republic:" + Catalog.GetString("Czech Republic") + ":" + "CZE",
                "Europe:" + "Denmark:" + Catalog.GetString("Denmark") + ":" + "DNK",
                "Europe:" + "Estonia:" + Catalog.GetString("Estonia") + ":" + "EST",
@@ -481,7 +481,8 @@ class SqliteCountry : Sqlite
        :'<,'>s/\(.*\),\(.*\):\(.*\),\(.*\))\(.*$\)/\1:\3")\5/
 
        except: congo, korea, Dominica
-       
+
+       1.16 Cyprus has been moved from Asia to Europe  
        */
 
 }
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index d486ade..e7db3d3 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -74,7 +74,7 @@ class Sqlite
         * Important, change this if there's any update to database
         * Important2: if database version get numbers higher than 1, check if the comparisons with 
currentVersion works ok
         */
-       static string lastChronojumpDatabaseVersion = "1.15";
+       static string lastChronojumpDatabaseVersion = "1.16";
 
        public Sqlite() {
        }
@@ -1697,6 +1697,17 @@ class Sqlite
 
                                currentVersion = "1.15";
                        }
+                       if(currentVersion == "1.15") {
+                               Sqlite.Open();
+                       
+                               Log.WriteLine("Cyprus moved to Europe");
+
+                               Update(true, Constants.CountryTable, "continent", "Asia", "Europe", "code", 
"CYP"); 
+                               SqlitePreferences.Update ("databaseVersion", "1.16", true); 
+                               Sqlite.Close();
+
+                               currentVersion = "1.16";
+                       }
        
                }
 
@@ -1841,6 +1852,7 @@ class Sqlite
                SqliteExecuteAuto.addChronojumpProfileAndBilateral();
                
                //changes [from - to - desc]
+               //1.15 - 1.16 Converted DB to 1.16 Cyprus moved to Europe
                //1.14 - 1.15 Converted DB to 1.15 added Chronojump profile and bilateral profile
                //1.13 - 1.14 Converted DB to 1.14 slCMJ -> slCMJleft, slCMJright
                //1.12 - 1.13 Converted DB to 1.13 Added ExecuteAuto table


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]