下記は 1.0.1 から 1.0.3 にマイグレーションを行った結果となるためインデックスの追加が含まれていますが,本チケットの部分について問題無いと思います.
元
$ mysql -u root -p example_com -e 'show create table blog_rss_cache\G'
Enter password:
*************************** 1. row ***************************
Table: blog_rss_cache
Create Table: CREATE TABLE `blog_rss_cache` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) DEFAULT NULL,
`title` text,
`description` text,
`link` text,
`date` datetime DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `date_INDEX_idx` (`date`),
KEY `member_id_idx` (`member_id`),
CONSTRAINT `blog_rss_cache_member_id_member_id` FOREIGN KEY (`member_id`) REFERENCES `member` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
マイグレーション後
$ mysql -u root -p example_com -e 'show create table blog_rss_cache\G'
Enter password:
*************************** 1. row ***************************
Table: blog_rss_cache
Create Table: CREATE TABLE `blog_rss_cache` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) DEFAULT NULL,
`title` text,
`description` text,
`link` text,
`date` datetime DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `date_INDEX_idx` (`date`),
KEY `member_id_idx` (`member_id`),
KEY `member_id_date_idx` (`member_id`,`date`),
CONSTRAINT `blog_rss_cache_member_id_member_id` FOREIGN KEY (`member_id`) REFERENCES `member` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8
インストール後
$ mysql -u root -p example_com -e 'show create table blog_rss_cache\G'
Enter password:
*************************** 1. row ***************************
Table: blog_rss_cache
Create Table: CREATE TABLE `blog_rss_cache` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) DEFAULT NULL,
`title` text,
`description` text,
`link` text,
`date` datetime DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `date_INDEX_idx` (`date`),
KEY `member_id_date_idx` (`member_id`,`date`),
KEY `member_id_idx` (`member_id`),
CONSTRAINT `blog_rss_cache_member_id_member_id` FOREIGN KEY (`member_id`) REFERENCES `member` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8