OSDN Git Service

Merge branch 'master' of git+ssh://master.hanzubon.jp/home/git/mubot4fb
[mubot4fb/mubot4fb.git] / mubot.mysql
1 CREATE TABLE posts (
2        id INT PRIMARY KEY AUTO_INCREMENT,
3        submitter TEXT NOT NULL,
4        submitter_type INTEGER NOT NULL default 1,
5        fb_post_id BIGINT UNSIGNED UNIQUE NOT NULL,
6        uri TEXT NOT NULL,
7        prefix TEXT NOT NULL,
8        suffix TEXT NOT NULL,
9        scheme TEXT NOT NULL,
10        path TEXT NOT NULL,
11        post_time BIGINT UNSIGNED NOT NULL
12 ) ENGINE = mroonga DEFAULT CHARSET utf8;
13
14 create index posts_fb_post_id_idx on posts(fb_post_id);
15 create index posts_post_time_idx on posts(post_time);
16 create index submitter_idx on posts(submitter(64));
17 create index uri_idx on posts(uri(1024));
18 create fulltext index full_submitter_idx on posts(submitter);
19 create fulltext index full_msg_path_idx on posts(prefix,path,suffix);
20 create fulltext index full_msg_idx on posts(prefix,uri,suffix);