Update Event from and to fields for postgresql compatibility#25
Update Event from and to fields for postgresql compatibility#25jeremiahishere wants to merge 2 commits intorefinery:masterfrom
Conversation
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 change from date to datetime fields. I have not included an upgrade migration for either database change.
There was a problem hiding this comment.
I believe you'll want t.datetime instead, no?
* Fixed data types on migration. * Removed uniqueness constraint on Event. * Fixed a bad ordering on Event.
There was a problem hiding this comment.
Why was this uniqueness constraint dropped? Inversely, why do events need unique titles?
There was a problem hiding this comment.
I am using my fork of the project for a live site. This is one of the changes that got committed to the pull request branch by mistake. I need non unique titles because, for example, I have many events called 'Board Meeting' that are differentiated by their date instead of title.
|
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. |
|
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. |
|
FWIW SQLite is also unhappy with columns named 'from' and 'to' - this PR addresses that as well. |
|
Replaced by #28 |
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.