OSDN Git Service

table define change to use mysql mroonga
[mubot4fb/mubot4fb.git] / mubot.mysql
1 CREATE TABLE posts (
2        id INT PRIMARY KEY AUTO_INCREMENT,
3        commiter TEXT NOT NULL,
4        commiter_type INTEGER NOT NULL default 1,
5        fb_post_id INTEGER UNIQUE NOT NULL,
6        uri TEXT NOT NULL,
7        prefix TEXT NOT NULL,
8        suffix TEXT NOT NULL,
9        post_time INTEGER NOT NULL
10 ) ENGINE = mroonga DEFAULT CHARSET utf8;
11
12 create index posts_fb_post_id_idx on posts(fb_post_id);
13 create index posts_post_time_idx on posts(post_time);
14 create fulltext index uri_idx on posts(uri);
15 create fulltext index prefix_idx on posts(prefix);
16 create fulltext index suffix_idx on posts(suffix);
17 create fulltext index msg_idx on posts(prefix,uri,suffix);
18