Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Decimal vs Float as related to tests with different databases


Go to End


519 Views

Avatar
muskie9

Community Member, 24 Posts

21 January 2015 at 4:42pm

I'm working on a module that requires another (addressable: https://github.com/silverstripe-australia/silverstripe-addressable) and am wondering if Float could cause tests with PostgreSQL to fail. My local unit and Travis tests with MySQL pass, but the PostgreSQL test fails in Travis. I've only worked in environments with MySQL and don't really have any experience with PostgreSQL. I'm very familiar with the docs and api and know that Decimal is listed in the docs. I also did some digging and found this: http://www.postgresql.org/docs/9.1/static/datatype-numeric.html which doesn't list float, but does list decimal.

Any insight would be greatly appreciated.
Thanks!