1 DROP TRIGGER `fts_on_insert`;
2 DROP TRIGGER `fts_on_update`;
4 ALTER TABLE forum_mysqlftsindex ADD COLUMN title varchar(300) NOT NULL, ADD COLUMN tagnames varchar(255) NOT NULL;
5 ALTER TABLE forum_mysqlftsindex ENGINE = MYISAM;
6 ALTER TABLE forum_mysqlftsindex ADD FULLTEXT `title`(title), ADD FULLTEXT `tagnames`(tagnames);
7 UPDATE forum_mysqlftsindex ind JOIN forum_node node ON ind.node_id = node.id SET ind.body = UPPER(node.body), ind.title = UPPER(node.title), ind.tagnames = UPPER(node.tagnames);
11 CREATE TRIGGER fts_on_insert AFTER INSERT ON forum_node
14 INSERT INTO forum_mysqlftsindex (node_id, title, body, tagnames) VALUES (NEW.id, UPPER(NEW.title), UPPER(NEW.body), UPPER(NEW.tagnames));
20 CREATE TRIGGER fts_on_update AFTER UPDATE ON forum_node
23 UPDATE forum_mysqlftsindex SET title = UPPER(NEW.title), body = UPPER(NEW.body), tagnames = UPPER(NEW.tagnames) WHERE node_id = NEW.id;
30 ALTER TABLE forum_mysqlftsindex ADD FULLTEXT(body);
31 ALTER TABLE forum_mysqlftsindex ADD FULLTEXT(title);
32 ALTER TABLE forum_mysqlftsindex ADD FULLTEXT(tagnames);