Michael Baldock wrote in post #971769:
> Hi all,
>
> I've got a database of events, and (possibly foolishly) I've got column
> names such as eventDate, with capital letters.
Oy. I agree with Michael that this is probably worth changing.
> When I want to order the
> list of events by their date, I use the line:
>
>
> @ed_ten_events = AllEvent.where(:city_location => 'Edinburgh',
> :ten_event => true).order('eventDate ASC')
>
>
> This works fine on the local server,
Using what DB?
> but on Heroku it crashes. The logs
> reveal that the Heroku Server is being searched with the wrong column
> name, one without capitals
Right. Heroku uses PostgreSQL, which converts all identifiers to
lowercase unless you surround them with double quotes. Check the
Postgres docs for more on this.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
Sent from my iPhone
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment