forked from FriendsOfREDAXO/search_it
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sql
54 lines (49 loc) · 1.98 KB
/
install.sql
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CREATE TABLE IF NOT EXISTS `%TABLE_PREFIX%search_it_index` (
`id` int(11) NOT NULL auto_increment,
`fid` varchar(255) NULL,
`catid` int(11) NULL,
`ftable` varchar(255) NULL,
`fcolumn` varchar(255) NULL,
`texttype` varchar(255) NOT NULL,
`clang` int(11) NULL,
`filename` varchar(255) NULL,
`fileext` varchar(255) NULL,
`plaintext` longtext NOT NULL default '',
`unchangedtext` longtext NOT NULL default '',
`teaser` longtext NOT NULL default '',
`values` longtext NOT NULL default '',
PRIMARY KEY (`id`),
INDEX (`fid`),
FULLTEXT (`plaintext`),
FULLTEXT (`unchangedtext`),
FULLTEXT (`plaintext`,`unchangedtext`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `%TABLE_PREFIX%search_it_index` CHANGE COLUMN fid fid varchar(255) NULL;
/* ALTER TABLE `%TABLE_PREFIX%search_it_index` ADD COLUMN `values` text NOT NULL default ''; */
/*DROP TRIGGER IF EXISTS minfid;
CREATE TRIGGER minfid BEFORE INSERT ON `%TABLE_PREFIX%search_it_index`
FOR EACH ROW
SET NEW.fid = CASE WHEN NEW.fid IS NULL THEN (SELECT IF(IFNULL(MIN(fid), 0) > 0, 0, IFNULL(MIN(fid), 0)) FROM `%TABLE_PREFIX%search_it_index`) - 1 ELSE NEW.fid END;*/
CREATE TABLE IF NOT EXISTS `%TABLE_PREFIX%search_it_cache` (
`id` int(11) NOT NULL auto_increment,
`hash` char(32) NOT NULL,
`returnarray` longtext NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `%TABLE_PREFIX%search_it_cacheindex_ids` (
`id` int(11) NOT NULL auto_increment,
`index_id` int(11) NULL,
`cache_id` varchar(255) NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `%TABLE_PREFIX%search_it_keywords` (
`id` int(11) NOT NULL auto_increment,
`keyword` varchar(255) NOT NULL,
`soundex` varchar(255) NOT NULL,
`metaphone` varchar(255) NOT NULL,
`colognephone` varchar(255) NOT NULL,
`clang` int(11) NOT NULL DEFAULT -1,
`count` int(11) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE (`keyword`,`clang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;