SchemaPlus / schema_validations

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

Validate decimal range #36

Closed felixbuenemann closed 8 years ago

felixbuenemann commented 8 years ago

The range of decimal columns is limited by the number of numerals (precision) and decimals (scale).

Example:

The range for a decimal column with precision 4 and scale 2 is ±99.99 or < 10^2 and > -10^2 using the formula abs(10^(precision - scale)).

This resolves #35.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 99.259% when pulling a4e2c1885b5d70e8d7556b1a70f8a3b3d353076e on felixbuenemann:decimal-validation into f0919a54e9462b7545264b85eda40b873c73e437 on SchemaPlus:master.

ronen commented 8 years ago

Cool. Update the README too?

felixbuenemann commented 8 years ago

Oh, forgot about the README. I'll look into it.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 99.259% when pulling 6fc0e515745a24c7ab483d7077949600aeb0f57c on felixbuenemann:decimal-validation into f0919a54e9462b7545264b85eda40b873c73e437 on SchemaPlus:master.

felixbuenemann commented 8 years ago

OK, updated the data types table in the README.

ronen commented 8 years ago

Cool again! I've released version 2.1.0 with this merged in.

Thanks for taking the time