Skip to content

Instantly share code, notes, and snippets.

@duderman
Created March 11, 2016 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duderman/e193bc44fdd10e9c39f3 to your computer and use it in GitHub Desktop.
Save duderman/e193bc44fdd10e9c39f3 to your computer and use it in GitHub Desktop.
Fix primary_key NULL for rails 2 and mysql 5.7
class ActiveRecord::ConnectionAdapters::MysqlAdapter
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