You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
== 20180523145630 DeviseCreateUsers: migrating ================================
-- create_table(:users)
-> 0.0241s
-- add_index(:users, :email, {:unique=>true})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX `index_users_on_email` ON `users` (`email`)
/localhome/jlecour/work/intra/chexpire/db/migrate/20180523145630_devise_create_users.rb:41:in `change'
/home/jlecour/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/home/jlecour/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX `index_users_on_email` ON `users` (`email`)
/localhome/jlecour/work/intra/chexpire/db/migrate/20180523145630_devise_create_users.rb:41:in `change'
/home/jlecour/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/home/jlecour/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
Caused by:
Mysql2::Error: Specified key was too long; max key length is 767 bytes
/localhome/jlecour/work/intra/chexpire/db/migrate/20180523145630_devise_create_users.rb:41:in `change'
/home/jlecour/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/home/jlecour/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
The text was updated successfully, but these errors were encountered:
There is a complex issue which depends on the verison of MySQL/MariaDB.
Basically, if you use MySQL < 5.7 (MySQL 5.5 or MariaDB 10.1) the workaround is to force the server to create tables with "utf8" instead of "utf8mb4" :
The text was updated successfully, but these errors were encountered: