Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary key column_hash is binary != :uuid #65

Open
markalanevans opened this issue May 6, 2015 · 2 comments
Open

Primary key column_hash is binary != :uuid #65

markalanevans opened this issue May 6, 2015 · 2 comments

Comments

@markalanevans
Copy link

On this line:
https://github.com/jashmenn/activeuuid/blob/master/lib/activeuuid/uuid.rb#L146

self.class.columns_hash[primary_key].type => binary

which != :uuid

The db is mysql, i'm using the mysql2 gem and the field is a binary 16 field in the DB.

Version

activeuuid (0.6.0)
activerecord (>= 3.1)
uuidtools

@ghost
Copy link

ghost commented Sep 16, 2015

add a file activeuuid.rb in your project config/initializers will fix this issues

ActiveRecord::Base.connection_pool.with_connection do
  ActiveUUID::Patches.apply!
end

@benjaminjackson
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants