From 6b217c32f24c1af3e535455de24f7a6545eba723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sun, 15 Mar 2015 16:59:50 +0100 Subject: [PATCH] Shorten index for tweet_id too in mysql utf8mb4 migration --- db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb b/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb index 6d16ce30d..9495e7f80 100644 --- a/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb +++ b/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb @@ -91,6 +91,9 @@ class SetMysqlToUnicodeMb4 < ActiveRecord::Migration remove_index 'posts', :name => 'index_posts_on_root_guid' add_index 'posts', ["root_guid"], :name => 'index_posts_on_root_guid', length: {"root_guid"=>191} + remove_index 'posts', :name => 'index_posts_on_tweet_id' + add_index 'posts', ['tweet_id'], :name => 'index_posts_on_tweet_id', length: {"tweet_id"=>191}, :using => :btree + remove_index 'rails_admin_histories', :name => 'index_rails_admin_histories' add_index 'rails_admin_histories', ["item", "table", "month", "year"], :name => 'index_rails_admin_histories', length: {"table"=>188}, :using => :btree