OSDN Git Service

table define change to use mysql mroonga
authorISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Wed, 17 Oct 2012 13:56:07 +0000 (22:56 +0900)
committerISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Wed, 17 Oct 2012 13:56:07 +0000 (22:56 +0900)
mubot.mysql [moved from mubot.sql with 56% similarity]

similarity index 56%
rename from mubot.sql
rename to mubot.mysql
index d075f12..219c954 100644 (file)
--- a/mubot.sql
@@ -1,5 +1,5 @@
 CREATE TABLE posts (
-       id INTEGER PRIMARY KEY NOT NULL,
+       id INT PRIMARY KEY AUTO_INCREMENT,
        commiter TEXT NOT NULL,
        commiter_type INTEGER NOT NULL default 1,
        fb_post_id INTEGER UNIQUE NOT NULL,
@@ -7,7 +7,12 @@ CREATE TABLE posts (
        prefix TEXT NOT NULL,
        suffix TEXT NOT NULL,
        post_time INTEGER NOT NULL
-);
+) ENGINE = mroonga DEFAULT CHARSET utf8;
 
 create index posts_fb_post_id_idx on posts(fb_post_id);
 create index posts_post_time_idx on posts(post_time);
+create fulltext index uri_idx on posts(uri);
+create fulltext index prefix_idx on posts(prefix);
+create fulltext index suffix_idx on posts(suffix);
+create fulltext index msg_idx on posts(prefix,uri,suffix);
+