Open benapetr opened 6 years ago
Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1
flux@kittybox:/opt/fluxday$ rake db:migrate /var/lib/gems/2.3.0/gems/activesupport-4.0.3/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now rake aborted! ActiveRecord::StatementInvalid: Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query' /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `block in query' /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `handle_interrupt' /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `query' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `block in execute' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:435:in `block in log' /var/lib/gems/2.3.0/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:430:in `log' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `execute' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:222:in `execute' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:524:in `add_index' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/schema_migration.rb:24:in `create_table' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:878:in `initialize' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:764:in `new' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:764:in `up' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:742:in `migrate' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>' /var/lib/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>' Mysql2::Error: Specified key was too long; max key length is 767 bytes /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query' /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `block in query' /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `handle_interrupt' /var/lib/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `query' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `block in execute' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:435:in `block in log' /var/lib/gems/2.3.0/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:430:in `log' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `execute' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:222:in `execute' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:524:in `add_index' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/schema_migration.rb:24:in `create_table' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:878:in `initialize' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:764:in `new' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:764:in `up' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/migration.rb:742:in `migrate' /var/lib/gems/2.3.0/gems/activerecord-4.0.3/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>' /var/lib/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Workaround is create db with specific char set:
MariaDB [(none)]> create database flux character set = 'utf8';
Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1