summaryrefslogtreecommitdiffstats
path: root/upgrades/dbpatches/1.4/postgresql/patch/history_uint.sql
blob: 120804ac02611bc0011c7b716e4bda0b61966987 (plain)
1
2
3
4
5
6
7
8
9
10
CREATE TABLE history_uint_tmp (
	itemid		bigint DEFAULT '0'	NOT NULL,
	clock		integer		DEFAULT '0'	NOT NULL,
	value		bigint DEFAULT '0'	NOT NULL
) with OIDS;
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 to history_uint;