[chronojump/optimizeRFD] DB: 2.08. Create table news and insert newsLanguageEs on preferences
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/optimizeRFD] DB: 2.08. Create table news and insert newsLanguageEs on preferences
- Date: Sun, 3 Jan 2021 17:07:55 +0000 (UTC)
commit 576cec86472bd315229e932f13124645f9812618
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Dec 28 14:46:14 2020 +0100
DB: 2.08. Create table news and insert newsLanguageEs on preferences
src/sqlite/main.cs | 13 ++++++++++++-
src/sqlite/preferences.cs | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index cf6c1759f..d90dee823 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -129,7 +129,7 @@ class Sqlite
/*
* Important, change this if there's any update to database
*/
- static string lastChronojumpDatabaseVersion = "2.07";
+ static string lastChronojumpDatabaseVersion = "2.08";
public Sqlite()
{
@@ -2834,6 +2834,15 @@ class Sqlite
currentVersion = updateVersion("2.07");
}
+ if(currentVersion == "2.07")
+ {
+ LogB.SQL("Create table news and insert newsLanguageEs on preferences");
+
+ SqliteNews.createTable();
+ SqlitePreferences.Insert (SqlitePreferences.NewsLanguageEs, "False");
+
+ currentVersion = updateVersion("2.08");
+ }
/*
if(currentVersion == "1.79")
@@ -2934,6 +2943,7 @@ class Sqlite
SqliteTagSession.createTable();
SqliteSessionTagSession.createTable();
+ SqliteNews.createTable();
SqlitePerson sqlitePersonObject = new SqlitePerson();
sqlitePersonObject.createTable(Constants.PersonTable);
@@ -3051,6 +3061,7 @@ class Sqlite
//just testing: 1.79 - 1.80 Converted DB to 1.80 Created table ForceSensorElasticBandGlue and moved
stiffnessString records there
+ //2.07 - 2.08 Converted DB to 2.08 Create table news and insert newsLanguageEs on preferences
//2.06 - 2.07 Converted DB to 2.07 Inserted into preferences: forceSensorVariabilityMethod
//2.05 - 2.06 Converted DB to 2.06 Default python version for all users: Python3
//2.04 - 2.05 Converted DB to 2.05 Inserted into preferences: forceSensorStartEndOptimized
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 78ce1c862..d63bc563d 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -35,6 +35,7 @@ class SqlitePreferences : Sqlite
public const string FontsOnGraphs = "fontsOnGraphs";
public const string RestTimeMinutes = "restTimeMinutes";
public const string RestTimeSeconds = "restTimeSeconds";
+ public const string NewsLanguageEs = "newsLanguageEs";
//contacts
public const string JumpsFVProfileOnlyBestInWeight = "jumpsFVProfileOnlyBestInWeight";
@@ -308,6 +309,7 @@ class SqlitePreferences : Sqlite
Insert ("email", "", dbcmdTr);
Insert ("muteLogs", "False", dbcmdTr);
Insert (ImporterPythonVersion,
Preferences.pythonVersionEnum.Python3.ToString(), dbcmdTr);
+ Insert (NewsLanguageEs, "False", dbcmdTr);
//session
Insert (LoadLastSessionAtStart, "True", dbcmdTr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]