SchemaPlus / schema_validations

Automatically creates validations basing on the database schema.
Other
173 stars 34 forks source link

Bug: Crashes when optimistic logging is in use #32

Closed ronen closed 8 years ago

ronen commented 8 years ago

If a module has optimistic logging enabled, schema_validations will raise this error

NoMethodError (undefined method `range' for #<ActiveRecord::Locking::LockingType:0x007ffb417aa690>)

Because although the locking field's column type is integer, the rails proxy object for the field is ActiveRecord::Locking::LockingType rather than `ActiveRecord::Type::Integer