diff options
Diffstat (limited to 'upgrades')
-rw-r--r-- | upgrades/dbpatches/1.0beta9_to_1.0beta10/mysql/patch.sql | 7 | ||||
-rw-r--r-- | upgrades/dbpatches/1.0beta9_to_1.0beta10/postgresql/patch.sql | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/upgrades/dbpatches/1.0beta9_to_1.0beta10/mysql/patch.sql b/upgrades/dbpatches/1.0beta9_to_1.0beta10/mysql/patch.sql index ebe6717b..55e32ce8 100644 --- a/upgrades/dbpatches/1.0beta9_to_1.0beta10/mysql/patch.sql +++ b/upgrades/dbpatches/1.0beta9_to_1.0beta10/mysql/patch.sql @@ -1,5 +1,6 @@ alter table items add units varchar(10) DEFAULT '' NOT NULL; alter table items add multiplier int(4) DEFAULT '' NOT NULL; +alter table sysmaps_links add triggerid int(4); update items set units='bps' where key_ like "netload%"; update items set units='bytes' where key_ like "memory[%]"; @@ -19,6 +20,8 @@ CREATE TABLE stats ( month int(4) DEFAULT '0' NOT NULL, day int(4) DEFAULT '0' NOT NULL, hour int(4) DEFAULT '0' NOT NULL, - value double(16,4) DEFAULT '0.0000' NOT NULL, - PRIMARY KEY (itemid,year,month,day,hour), + value_max double(16,4) DEFAULT '0.0000' NOT NULL, + value_min double(16,4) DEFAULT '0.0000' NOT NULL, + value_avg double(16,4) DEFAULT '0.0000' NOT NULL, + PRIMARY KEY (itemid,year,month,day,hour) ) type=InnoDB; diff --git a/upgrades/dbpatches/1.0beta9_to_1.0beta10/postgresql/patch.sql b/upgrades/dbpatches/1.0beta9_to_1.0beta10/postgresql/patch.sql index 9737dd88..3dfd53be 100644 --- a/upgrades/dbpatches/1.0beta9_to_1.0beta10/postgresql/patch.sql +++ b/upgrades/dbpatches/1.0beta9_to_1.0beta10/postgresql/patch.sql @@ -1,5 +1,6 @@ alter table items add units varchar(10) DEFAULT '' NOT NULL; alter table items add multiplier int4 DEFAULT '' NOT NULL; +alter table sysmaps_links add triggerid int4; update items set units='bps' where key_ like "netload%"; update items set units='bytes' where key_ like "memory[%]"; @@ -16,6 +17,8 @@ CREATE TABLE stats ( month int4 DEFAULT '0' NOT NULL, day int4 DEFAULT '0' NOT NULL, hour int4 DEFAULT '0' NOT NULL, - value float8 DEFAULT '0.0000' NOT NULL, - PRIMARY KEY (itemid,year,month,day,hour), + value_max float8 DEFAULT '0.0000' NOT NULL, + value_min float8 DEFAULT '0.0000' NOT NULL, + value_avg float8 DEFAULT '0.0000' NOT NULL, + PRIMARY KEY (itemid,year,month,day,hour) ); |