[chronojump] Deleted "Max" jump type (wwe already have "Free")



commit 4c010c21e0f0596e21f0514d0219293b87187f51
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Dec 1 18:38:23 2014 +0100

    Deleted "Max" jump type (wwe already have "Free")

 src/sqlite/jumpType.cs |    4 ++--
 src/sqlite/main.cs     |   15 ++++++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/sqlite/jumpType.cs b/src/sqlite/jumpType.cs
index f2f5253..827fdf7 100644
--- a/src/sqlite/jumpType.cs
+++ b/src/sqlite/jumpType.cs
@@ -59,7 +59,7 @@ class SqliteJumpType : Sqlite
                        "slCMJright:1:0:Single-leg CMJ jump",
                        "ABK:1:0:ABK jump", 
                        "ABKl:1:1:ABK jump with weight", 
-                       "Max:1:0:;Maximum jump", 
+                       //"Max:1:0:;Maximum jump", 
                        //"DJ:0:0:DJ jump",
                        "DJa:0:0:DJ jump using arms",
                        "DJna:0:0:DJ jump without using arms",
@@ -88,7 +88,7 @@ class SqliteJumpType : Sqlite
                SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJl", "jump_cmj_l.png", true);
                SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABK", "jump_abk.png", true);
                SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABKl", "jump_abk_l.png", true);
-               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Max", "jump_max.png", true);
+               //SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Max", "jump_max.png", true); //we 
already have "Free"
                SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Rocket", "jump_rocket.png", true);
                //SqliteEvent.GraphLinkInsert (Constants.JumpTable, "DJ", "jump_dj.png", true);
                SqliteEvent.GraphLinkInsert (Constants.JumpTable, "DJa", "jump_dj_a.png", true);
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 54b0537..e15eb07 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.16";
+       static string lastChronojumpDatabaseVersion = "1.17";
 
        public Sqlite() {
        }
@@ -1708,6 +1708,18 @@ class Sqlite
 
                                currentVersion = "1.16";
                        }
+                       if(currentVersion == "1.16") {
+                               Sqlite.Open();
+                       
+                               Log.WriteLine("Deleting Max jump");
+
+                               Update(true, Constants.JumpTable, "type", "Max", "Free", "", ""); 
+                               DeleteFromName(true, Constants.JumpTypeTable, "Max");
+                               SqlitePreferences.Update ("databaseVersion", "1.17", true); 
+                               Sqlite.Close();
+
+                               currentVersion = "1.17";
+                       }
        
                }
 
@@ -1852,6 +1864,7 @@ class Sqlite
                SqliteExecuteAuto.addChronojumpProfileAndBilateral();
                
                //changes [from - to - desc]
+               //1.16 - 1.17 Converted DB to 1.17 Deleted Max jump (we already have "Free")
                //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


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