Please sign in to comment.
reserve index name chars for internal rails operations
Some adapter (SQLite3) need to perform renaming operations to support the rails DDL. These rename prefixes operate with prefixes. When an index name already uses up the full space provieded by `index_name_length` these internal operations will fail. This patch introduces `allowed_index_name_length` which respects the amount of characters used for internal operations. It will always be <= `index_name_length` and every adapter can define how many characters need to be reserved.
- Loading branch information...
Showing with 64 additions and 9 deletions.
- +8 −0 activerecord/CHANGELOG.md
- +9 −0 activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb
- +5 −3 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
- +8 −1 activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
- +23 −5 activerecord/test/cases/migration/index_test.rb
- +11 −0 activerecord/test/cases/migration/rename_column_test.rb