|
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS variable (
|
10
|
10
|
type CHAR(1) NOT NULL,
|
11
|
11
|
address INT NOT NULL,
|
12
|
12
|
unit VARCHAR(5) NULL,
|
13
|
|
- last_update DATETIME NULL,
|
|
13
|
+ last_update DATE NULL,
|
14
|
14
|
|
15
|
15
|
|
16
|
16
|
FOREIGN KEY (type) REFERENCES var_type(slabel)
|
|
@@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS variable (
|
21
|
21
|
CREATE TABLE IF NOT EXISTS var_value (
|
22
|
22
|
type CHAR(1) NOT NULL,
|
23
|
23
|
address INT NOT NULL,
|
24
|
|
- time DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
24
|
+ time DATE DEFAULT CURRENT_TIMESTAMP,
|
25
|
25
|
value INT NOT NULL,
|
26
|
26
|
|
27
|
27
|
FOREIGN KEY (type) REFERENCES variable(type)
|