summaryrefslogtreecommitdiffstats
path: root/upgrades/dbpatches/1.4/postgresql/patch/history_str.sql
blob: 6ec70222b469fed87fe22612d5fcc7a34379ca74 (plain)
1
2
3
4
5
6
7
8
9
10
CREATE TABLE history_str_tmp (
	itemid		bigint DEFAULT '0'	NOT NULL,
	clock		integer		DEFAULT '0'	NOT NULL,
	value		varchar(255)		DEFAULT ''	NOT NULL
) with OIDS;
CREATE INDEX history_str_1 on history_str_tmp (itemid,clock);

insert into history_str_tmp select * from history_str;
drop table history_str;
alter table history_str_tmp rename to history_str;