summaryrefslogtreecommitdiffstats
path: root/upgrades/dbpatches/1.4/mysql/patch/history_uint.sql
blob: 1b451a732e8e334f7c96f0e1be2d5ac80d780f96 (plain)
1
2
3
4
5
6
7
8
9
10
CREATE TABLE history_uint_tmp (
	itemid		bigint unsigned		DEFAULT '0'	NOT NULL,
	clock		integer		DEFAULT '0'	NOT NULL,
	value		bigint unsigned		DEFAULT '0'	NOT NULL
) ENGINE=InnoDB;
CREATE INDEX history_uint_1 on history_uint_tmp (itemid,clock);

insert into history_uint_tmp select * from history_uint;
drop table history_uint;
alter table history_uint_tmp rename history_uint;