SchemaPlus / schema_validations

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

Support Postgres money column type #45

Closed plicjo closed 8 years ago

plicjo commented 8 years ago

Opened as a result of the discussion in this PR: https://github.com/SchemaPlus/schema_validations/pull/44#issuecomment-260828017

With numeric types things are more complicated, since Postgres has the Money type, for instance, and it looks like it won't be detected as numeric. Then again, the old code might have been wrong too, since it detected Money as numeric, but not as decimal. ...

With the current version of Rails it seems that the only missing type is :money from PostgreSQL which should be mapped to Decimal.

We need to add validation support for the :money column type in PostgreSQL as if it was a decimal column.

boazy commented 8 years ago

Fixed with 83ba3ab

boazy commented 8 years ago

I want to write unit tests for that, so I'm reopening a new issue for unit tests, so I've opened a new issue #46.