|
@@ -314,6 +314,14 @@
|
314
|
314
|
query.exec("UPDATE TypicaFeatures SET version = 7 WHERE feature = 'base-features'");
|
315
|
315
|
query = query.invalidate();
|
316
|
316
|
};
|
|
317
|
+ /* Updates for Typica version 1.9 */
|
|
318
|
+ var DBUpdate19 = function() {
|
|
319
|
+ var query = new QSqlQuery;
|
|
320
|
+ query.exec("ALTER TABLE roasting_specification ADD COLUMN spec jsonb");
|
|
321
|
+ query.exec("UPDATE TypicaFeatures SET version = 8 WHERE feature = 'base-features'");
|
|
322
|
+ query = query.invalidate();
|
|
323
|
+ };
|
|
324
|
+
|
317
|
325
|
if(Application.databaseConnected()) {
|
318
|
326
|
query = new QSqlQuery();
|
319
|
327
|
/* A table keeps track of database versioning information. This
|
|
@@ -351,6 +359,9 @@
|
351
|
359
|
if(query.value(2) < 7) {
|
352
|
360
|
DBUpdate18();
|
353
|
361
|
}
|
|
362
|
+ if(query.value(2) < 8) {
|
|
363
|
+ DBUpdate19();
|
|
364
|
+ }
|
354
|
365
|
}
|
355
|
366
|
else
|
356
|
367
|
{
|
|
@@ -362,6 +373,7 @@
|
362
|
373
|
DBUpdateReminders();
|
363
|
374
|
DBUpdateSpecification();
|
364
|
375
|
DBUpdate18();
|
|
376
|
+ DBUpdate19();
|
365
|
377
|
}
|
366
|
378
|
query.exec("SELECT feature, enabled, version FROM TypicaFeatures WHERE feature = 'sample-roasting'");
|
367
|
379
|
if(query.next())
|