spec/zdm_spec.rb in zdm-1.0.2 vs spec/zdm_spec.rb in zdm-1.0.3
- old
+ new
@@ -42,11 +42,12 @@
`name` varchar(99) COLLATE utf8_unicode_ci NOT NULL,
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`test` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'foo',
PRIMARY KEY (`id`), UNIQUE KEY `index_people_on_name` (`name`),
- KEY `index_people_on_account_id_and_code` (`account_id`,`code`(191)) USING BTREE
+ KEY `index_people_on_account_id_and_code` (`account_id`,`code`(191)) USING BTREE,
+ KEY `index_people_on_created_at` (`created_at`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
EOS
archive_tables = conn.send(Zdm.tables_method).select { |name| name.starts_with?('zdma_') }
expect(archive_tables.length).to eq(1)
@@ -75,10 +76,11 @@
`account_id` int(11) DEFAULT NULL,
`name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` datetime DEFAULT NULL, PRIMARY KEY (`id`),
UNIQUE KEY `index_people_on_name` (`name`),
- KEY `index_people_on_account_id_and_code` (`account_id`,`code`(191)) USING BTREE
+ KEY `index_people_on_account_id_and_code` (`account_id`,`code`(191)) USING BTREE,
+ KEY `index_people_on_created_at` (`created_at`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
EOS
archive_tables = conn.send(Zdm.tables_method).select { |name| name.starts_with?('zdma_') }
expect(archive_tables.length).to eq(2)
\ No newline at end of file