[chronojump] Minor change
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Minor change
- Date: Mon, 31 Jan 2022 11:24:55 +0000 (UTC)
commit d61aadd6ce353cc6c2aed3c901679c84b807be85
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jan 31 12:24:28 2022 +0100
Minor change
src/sqlite/main.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index ba8c9855f..259b7d8f6 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -3067,8 +3067,13 @@ class Sqlite
if(currentVersion == "2.28")
{
LogB.SQL("ForceSensor ALTER TABLE added maxForceRaw, maxAvgForce1s");
+ /*
+ we need this try/catch and in the rest of the ALTER TABLEs
+ because eg. in migration from 1.68 forceSensor table is created with all
columns (including these two)
+ lack of this try/catch was the problem of Chronojump 2.2.0 in migration
from 1.9.0 or older
+ */
try {
- executeSQL("ALTER TABLE " + Constants.ForceSensorTable + " ADD COLUMN
maxForceRaw FLOAT DEFAULT -1;"); //this should be Raw
+ executeSQL("ALTER TABLE " + Constants.ForceSensorTable + " ADD COLUMN
maxForceRaw FLOAT DEFAULT -1;");
executeSQL("ALTER TABLE " + Constants.ForceSensorTable + " ADD COLUMN
maxAvgForce1s FLOAT DEFAULT -1;");
} catch {
LogB.SQL("Catched at Doing ALTER TABLE added maxForceRaw,
maxAvgForce1s. Probably forceSensorTable has been created with this columns already added.");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]