0
私はレール5.1にアップグレードしていますが、インデックス名が長すぎるためにマイグレーションに失敗しています。Ruby on rails 5.1アップグレード、インデックス名を指定できません
エラー:
ArgumentError: Index name 'index_mailboxer_notifications_on_notified_object_type_and_notified_object_id' on table 'mailboxer_notifications' is too long; the limit is 63 characters
インデックス名が自動的に作成されますが、私はname:
コマンドを使用してそれに名前を付けることができるはずです。
Migration.rb
add_index :mailboxer_notifications, [:notified_object_id, :notified_object_type],
name: 'index_mailboxer_notifications_on_notified_object_id_and_type'
しかしname:
コマンドは無視なっているようです。これはレール5.1で変更されましたか?インデックスに名前を付ける他の方法はありますか?