Started tag logic to store tags in database

This commit is contained in:
Patrick McDonagh
2016-04-03 16:23:18 -05:00
parent 320e8c37a2
commit 381ba39993
3 changed files with 243 additions and 163 deletions

View File

@@ -103,6 +103,24 @@ CREATE TABLE IF NOT EXISTS card_history_dates(
first_id INTEGER
);
CREATE TABLE IF NOT EXISTS tag_classes(
id INTEGER PRIMARY KEY,
tag_class TEXT,
description TEXT
);
CREATE TABLE IF NOT EXISTS tags(
id INTEGER PRIMARY KEY,
name TEXT,
class INTEGER,
tag TEXT,
data_type TEXT,
change_threshold REAL,
guarantee_sec INTEGER,
map_function TEXT
);
CREATE TABLE IF NOT EXISTS tag_vals(
id INTEGER PRIMARY KEY,
dtime TIMESTAMP,
@@ -122,3 +140,17 @@ CREATE TABLE IF NOT EXISTS run_status(
dtime TIMESTAMP,
status TEXT
);
CREATE TABLE IF NOT EXISTS alarm_classes(
id INTEGER PRIMARY KEY,
alarm_class INTEGER,
description TEXT
);
CREATE TABLE IF NOT EXISTS alarms(
id INTEGER PRIMARY KEY,
name TEXT,
class INTEGER,
tag TEXT,
condition TEXT
);