CREATE TABLE posts (
id INT PRIMARY KEY AUTO_INCREMENT,
- submitter TEXT NOT NULL,
+ submitter VARCHAR(32) NOT NULL,
submitter_type INTEGER NOT NULL default 1,
fb_post_id BIGINT UNSIGNED UNIQUE NOT NULL,
- uri TEXT NOT NULL,
- prefix TEXT NOT NULL,
- suffix TEXT NOT NULL,
- scheme TEXT NOT NULL,
- path TEXT NOT NULL,
+ uri VARCHAR(1024) NOT NULL,
+ prefix VARCHAR(512) NOT NULL,
+ comment VARCHAR(1024) NOT NULL,
+ scheme VARCHAR(1024) NOT NULL,
+ path VARCHAR(1024) NOT NULL,
post_time BIGINT UNSIGNED NOT NULL
-) ENGINE = mroonga DEFAULT CHARSET utf8;
+) ENGINE = innodb 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 index submitter_idx on posts(submitter(64));
-create index uri_idx on posts(uri(1024));
-create fulltext index full_submitter_idx on posts(submitter);
-create fulltext index full_msg_path_idx on posts(prefix,path,suffix);
-create fulltext index full_msg_idx on posts(prefix,uri,suffix);
+create index submitter_idx on posts(submitter);
+create index uri_idx on posts(uri);
+create index path_idx on posts(path);