OSDN Git Service

fix SQL param
[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        scheme TEXT NOT NULL,
7        uri TEXT NOT NULL,
8        prefix TEXT NOT NULL,
9        suffix TEXT NOT NULL,
10        scheme TEXT NOT NULL,
11        path TEXT NOT NULL,
12        post_time BIGINT UNSIGNED NOT NULL
13 ) ENGINE = mroonga DEFAULT CHARSET utf8;
14
15 create index posts_fb_post_id_idx on posts(fb_post_id);
16 create index posts_post_time_idx on posts(post_time);
17 create fulltext index submitter_idx on posts(submitter);
18 create fulltext index uri_idx on posts(uri);
19 create fulltext index msg_idx on posts(prefix,path,suffix);
20 create fulltext index msg_full_idx on posts(prefix,uri,suffix);