refinery / refinerycms-calendar

Refinery CMS Events Engine
http://refinerycms.com
69 stars 73 forks source link

Update Event from and to fields for postgresql compatibility #25

Closed jeremiahishere closed 11 years ago

jeremiahishere commented 12 years ago

The from and to fields were changed to start_at and end_at for postgresql compatibility. The forms have been updated for the new fields. The locales still call the fields "From" and "To" but are now referenced with :start_at and :end_at.

The two fields were also changed from date to datetime fields.

I have not included an upgrade migration for either database change.

MarkBennett commented 12 years ago

Any progress on this pull request? I'm experiencing a similar issue with Postgres compatibility. Without this change it is difficult to deploy properly to Heroku.

jeremiahishere commented 12 years ago

My fork works as a temporary fix for postgres on heroku. You can regenerate the migrations or write one yourself that changes the from and to fields to start_at and end_at.

sbeam commented 12 years ago

FWIW SQLite is also unhappy with columns named 'from' and 'to' - this PR addresses that as well.

SQLite3::SQLException: near "from": syntax error: SELECT "refinery_calendar_events".* FROM "refinery_calendar_events"  WHERE (refinery_calendar_events.from >= '2012-08-23 13:59:00.718555') ORDER BY refinery_calendar_events.from DESC
parndt commented 11 years ago

Replaced by #28