OSDN Git Service

drop duplicate column
[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 fulltext index submitter_idx on posts(submitter);
17 create fulltext index uri_idx on posts(uri);
18 create fulltext index msg_idx on posts(prefix,path,suffix);
19 create fulltext index msg_full_idx on posts(prefix,uri,suffix);