blob: f771b17b0214bc0a7e902a7ad3ed7aa44e7ee83a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
CREATE TABLE trigger_depends_tmp (
triggerdepid bigint DEFAULT '0' NOT NULL,
triggerid_down bigint DEFAULT '0' NOT NULL,
triggerid_up bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (triggerdepid)
) with OIDS;
CREATE INDEX trigger_depends_tmp_1 on trigger_depends_tmp (triggerid_down,triggerid_up);
CREATE INDEX trigger_depends_tmp_2 on trigger_depends_tmp (triggerid_up);
insert into trigger_depends_tmp select NULL,triggerid_down,triggerid_up from trigger_depends;
drop table trigger_depends;
alter table trigger_depends_tmp rename to trigger_depends;
CREATE TABLE trigger_depends_tmp (
triggerdepid bigint DEFAULT '0' NOT NULL,
triggerid_down bigint DEFAULT '0' NOT NULL,
triggerid_up bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (triggerdepid)
) with OIDS;
CREATE INDEX trigger_depends_1 on trigger_depends_tmp (triggerid_down,triggerid_up);
CREATE INDEX trigger_depends_2 on trigger_depends_tmp (triggerid_up);
insert into trigger_depends_tmp select * from trigger_depends;
drop table trigger_depends;
alter table trigger_depends_tmp rename to trigger_depends;
|