-
Notifications
You must be signed in to change notification settings - Fork 383
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
MSSQL - NATIVE_DATABASE_TYPES does not exist #508
Comments
Hey! please do not ask questions here - this is not a support forum ... have you tried looking through code :) ?!
might work with adapter: mssql |
Thanks 👍 I looked through the code and wondering whether NATIVE_DATABASE_TYPES was left out intentionally. thanks for your help.. I added an initializer file with the content below: ActiveRecord::ConnectionAdapters::MSSQLAdapter.class_eval do
def modify_types(types)
super
types[:primary_key] = "bigint NOT NULL IDENTITY(1, 1) PRIMARY KEY"
types
end
end |
I see, thanks ... so gems actually assume |
@kares Ok, so I see what you mean now about This is a bit of a problem I guess, because some adapters like the db2 adapter define Each adapter's Another idea would be to do the opposite. So, I think I'll stay out of it. Like you and @stonehz said, the right way is for anything that wants to override a default type to have a |
closing due 230f9c5 |
In my attempt to override certain default data types
I discovered that NATIVE_DATABASE_TYPES does not exist for MSSQL.
Checking here:
https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/mssql/adapter.rb
All other DBs seem to have one (mysql, postgres,oracle,sqllite3,etc)
Is there another way to override data_types?
Thank you in advance!
The text was updated successfully, but these errors were encountered: