BeaconCMS/beacon

Migrate embed `Page.Event` to a relational table `PageEventHandlers`

leandrocp opened this issue · 0 comments

We need to migrate the existing embed Page.Event into its own table beacon_page_event_handlers and schema Beacon.Content.PageEventHandler, similar to how #296 was implemented.

  • Remove
    embeds_many :events, Event do
    field :name, :string
    field :code, :string
    end
  • Create table
  • Create schema
  • Create has_many :event_handlers association in Content.Page
  • Preload :event_handlers association like was done on PR #296
  • Fix tests and old mentions to that code