|
|
|
|
319
|
var query = new QSqlQuery;
|
319
|
var query = new QSqlQuery;
|
320
|
query.exec("ALTER TABLE roasting_specification ADD COLUMN spec jsonb");
|
320
|
query.exec("ALTER TABLE roasting_specification ADD COLUMN spec jsonb");
|
321
|
query.exec("ALTER TABLE roasting_log ADD COLUMN additional_data jsonb");
|
321
|
query.exec("ALTER TABLE roasting_log ADD COLUMN additional_data jsonb");
|
|
|
322
|
+ query.exec("CREATE TABLE IF NOT EXISTS scheduled_roasts (id bigserial PRIMARY KEY, machine bigint, \"time\" timestamp without time zone, data jsonb NOT NULL)");
|
|
|
323
|
+ query.exec("CREATE OR REPLACE FUNCTION notify_scheduled_roasts_changed() RETURNS trigger AS $$ BEGIN NOTIFY ScheduledRoastsChange; RETURN NULL; END; $$ LANGUAGE plpgsql");
|
|
|
324
|
+ query.exec("CREATE TRIGGER notify_scheduled_roasts_changed AFTER INSERT OR UPDATE OR DELETE OR TRUNCATE ON scheduled_roasts FOR EACH STATEMENT EXECUTE PROCEDURE notify_scheduled_roasts_changed()");
|
322
|
query.exec("UPDATE TypicaFeatures SET version = 8 WHERE feature = 'base-features'");
|
325
|
query.exec("UPDATE TypicaFeatures SET version = 8 WHERE feature = 'base-features'");
|
323
|
query = query.invalidate();
|
326
|
query = query.invalidate();
|
324
|
};
|
327
|
};
|
|
|
|
|
405
|
}
|
408
|
}
|
406
|
query = query.invalidate();
|
409
|
query = query.invalidate();
|
407
|
}
|
410
|
}
|
408
|
-
|
|
|
409
|
var switchuser = findChildObject(this, 'switchuser');
|
411
|
var switchuser = findChildObject(this, 'switchuser');
|
410
|
switchuser.triggered.connect(function() {
|
412
|
switchuser.triggered.connect(function() {
|
411
|
var loginDialog = new LoginDialog();
|
413
|
var loginDialog = new LoginDialog();
|