Skip to content

Instantly share code, notes, and snippets.

@chen1i
Created July 25, 2016 09:43
Show Gist options
  • Save chen1i/957a6d82da518f471581c272a4ebde3a to your computer and use it in GitHub Desktop.
Save chen1i/957a6d82da518f471581c272a4ebde3a to your computer and use it in GitHub Desktop.
work around to resolve mysql5.7 and rails 3.22.1 issue
# this is due to break change in Mysql 5.7.x, and latest Rails4.2.x already have this patched.
# remove this file when upgrade to Rails 4.2.x
class ActiveRecord::ConnectionAdapters::Mysql2Adapter
NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment