blob: 250068ae93a17ea6afa15667563e8b19d6a00fff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
CREATE TABLE images_tmp (
imageid bigint DEFAULT '0' NOT NULL,
imagetype integer DEFAULT '0' NOT NULL,
name varchar(64) DEFAULT '0' NOT NULL,
image bytea DEFAULT '' NOT NULL,
PRIMARY KEY (imageid)
);
CREATE INDEX images_1 on images_tmp (imagetype,name);
insert into images_tmp select * from images;
drop table images;
alter table images_tmp rename to images;
|