开发者

what possible are the possible reasons the sorting of my objects is different when deploying to heroku than what it is locally?

开发者 https://www.devze.com 2023-03-01 17:09 出处:网络
i deploy doing: git add . git commit -a -m \"Next release\" git p开发者_StackOverflow社区ush heroku master

i deploy doing:

git add . git commit -a -m "Next release"

git p开发者_StackOverflow社区ush heroku master

and also for the db heroku db:push

without getting any errors. Am i missing something?


It might be good to note the stack your are using on heroku.

>heroku stack

If your sort is using hashes, Ruby 1.8.7 will not sort the hashes in the same order unlike ruby 1.9.2.


Normally, the odds favor different collations on the two platforms. In SQL databases, sort order is controlled by a collation (aka "collation order" or "collating sequence").

But I'd expect ORDER BY to sort integers the same. Of course, if you develop against SQLite and deploy to PostgreSQL, you might find differences in the handling of nulls and duplicates.

See SQLite documentation sections 5.0 Sorting, Grouping and Compound SELECTs, and 6.0 Collating Sequences.

Some of the details with respect to PostgreSQL are documented under CREATE TABLE.

0

精彩评论

暂无评论...
验证码 换一张
取 消