Details
Description
Some indexes can not be created on UTF-8 encoded database. This is a well-known limitation of mysql. An index row is limited to 1000 bytes, but an UTF-8 character is encoded on 2 or 3 bytes. It limits an index row to 333 VARCHAR.
The stacktrace is :
ActiveRecord::StatementInvalid (ArgumentError: Specified key was too long; max key length is 1000 bytes: CREATE INDEX `projects_grp_art_brch` ON projects (`group_ id`, `artifact_id`, `branch`)): /home/sonar-1.2/lib/sonar-web/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.6/lib/active_record/connection_adapters/jdbc_adapter.rb:571:in `log_no_bench' /home/sonar-1.2/lib/sonar-web/WEB-INF/gems/gems/activerecord-1.15.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:197:in `execute' /home/sonar-1.2/lib/sonar-web/WEB-INF/gems/gems/activerecord-1.15.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:197:in `add_index' /home/sonar-1.2/lib/sonar-web/WEB-INF/gems/gems/activerecord-1.15.6/lib/active_record/migration.rb:275:in `send'