1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
--- a/create_db_tables.sql.in
+++ b/create_db_tables.sql.in
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS access_address (
user varchar(255) default NULL,
address varchar(255) default NULL,
netmask varchar(255) default 'FF.FF.FF.FF',
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00'
) ENGINE=InnoDB;
@@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS access_device (
user varchar(255) default NULL,
device varchar(255) default NULL,
rights varchar(255) default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00'
) ENGINE=InnoDB;
@@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS attribute_alias (
name varchar(255) NOT NULL default '',
device varchar(255) NOT NULL default '',
attribute varchar(255) NOT NULL default '',
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_attribute_alias (alias(64),name(64))
@@ -46,7 +46,7 @@ CREATE TABLE IF NOT EXISTS attribute_alias (
CREATE TABLE IF NOT EXISTS attribute_class (
class varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_attribute_class (class(64),name(64))
@@ -101,7 +101,7 @@ CREATE TABLE IF NOT EXISTS property (
name varchar(255) default NULL,
count int(11) default NULL,
value text default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_name (object(64),name(64))
@@ -117,7 +117,7 @@ CREATE TABLE IF NOT EXISTS property_attribute_class (
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
value text default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_property_attribute_class (class(64),attribute(64),name(64),count)
@@ -133,7 +133,7 @@ CREATE TABLE IF NOT EXISTS property_attribute_device (
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
value text default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_property_attribute_device (device(64),attribute(64),name(64),count)
@@ -148,7 +148,7 @@ CREATE TABLE IF NOT EXISTS property_class (
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
value text default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_property (class(64),name(64),count)
@@ -166,7 +166,7 @@ CREATE TABLE IF NOT EXISTS property_device (
member varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
value text default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_resource (device(64),name(64),count)
@@ -182,7 +182,7 @@ CREATE TABLE IF NOT EXISTS property_pipe_class (
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
value text default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_property_pipe_class (class(64),pipe(64),name(64),count)
@@ -198,7 +198,7 @@ CREATE TABLE IF NOT EXISTS property_pipe_device (
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
value text default NULL,
- updated timestamp NOT NULL,
+ updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
accessed timestamp NOT NULL default '2000-01-01 00:00:00',
comment text,
KEY index_property_pipe_device (device(64),pipe(64),name(64),count)
@@ -254,7 +254,7 @@ CREATE TABLE IF NOT EXISTS object_history_id (
CREATE TABLE IF NOT EXISTS property_hist (
id bigint unsigned NOT NULL default '0',
- date timestamp NOT NULL,
+ date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
object varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
@@ -265,7 +265,7 @@ CREATE TABLE IF NOT EXISTS property_hist (
CREATE TABLE IF NOT EXISTS property_device_hist (
id bigint unsigned NOT NULL default '0',
- date timestamp NOT NULL,
+ date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
device varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
@@ -276,7 +276,7 @@ CREATE TABLE IF NOT EXISTS property_device_hist (
CREATE TABLE IF NOT EXISTS property_class_hist (
id bigint unsigned NOT NULL default '0',
- date timestamp NOT NULL,
+ date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
class varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
count int(11) NOT NULL default '0',
@@ -287,7 +287,7 @@ CREATE TABLE IF NOT EXISTS property_class_hist (
CREATE TABLE IF NOT EXISTS property_attribute_class_hist (
id bigint unsigned NOT NULL default '0',
- date timestamp NOT NULL,
+ date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
class varchar(255) NOT NULL default '',
attribute varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
@@ -300,7 +300,7 @@ CREATE TABLE IF NOT EXISTS property_attribute_class_hist (
CREATE TABLE IF NOT EXISTS property_attribute_device_hist (
id bigint unsigned NOT NULL default '0',
count int(11) NOT NULL default '0',
- date timestamp NOT NULL,
+ date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
device varchar(255) NOT NULL default '',
attribute varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
@@ -311,7 +311,7 @@ CREATE TABLE IF NOT EXISTS property_attribute_device_hist (
CREATE TABLE IF NOT EXISTS property_pipe_class_hist (
id bigint unsigned NOT NULL default '0',
- date timestamp NOT NULL,
+ date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
class varchar(255) NOT NULL default '',
pipe varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
@@ -323,7 +323,7 @@ CREATE TABLE IF NOT EXISTS property_pipe_class_hist (
CREATE TABLE IF NOT EXISTS property_pipe_device_hist (
id bigint unsigned NOT NULL default '0',
- date timestamp NOT NULL,
+ date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
device varchar(255) NOT NULL default '',
pipe varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
|