Skip to content

Events stored in the database instead of YAML files - first draft - #487

Open
kcomandich wants to merge 13 commits into
rubyaustralia:mainfrom
kcomandich:feature/events_architecture
Open

Events stored in the database instead of YAML files - first draft#487
kcomandich wants to merge 13 commits into
rubyaustralia:mainfrom
kcomandich:feature/events_architecture

Conversation

@kcomandich

@kcomandich kcomandich commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Move events from a YAML file to the database, and provide a way to create/edit/delete events

There are a few remaining items to finish before it's ready to use, but I wanted to make sure I'm on the right track.

See discussion on #342. Implementation so far:

  • 1. Create an ApplicationRecord class DatabaseEvent (but use the events db table)
  • 2. Update the User class to add :meetup_admin scope
  • 3. Data migration & import from yaml file
  • 4. Clone the relevant views, except they’re populated from events table instead of yaml
  • 5. Add "Edit" button to meetup Event page to a form for updating the Event (ex. https://melbourne.ruby.org.au/events/2026-05-28-ruby-melbourne)
  • 6. Add "Add Event" button to meetup Events page (ex. https://melbourne.ruby.org.au/events) to a form for adding a new Event
  • 7. Create new events in the events table using the CRUD
  • 8. Check if it's all working - compare old views with new views (but see below for new changes)
  • 9. Replace the old views with the new views
  • 10. Delete old Event class
  • 11. Rename DatabaseEvent to Event

Note that UUIDs from the events.yml file don't appear to be used, LMK if they should be.

Still to do/fix:

  • Need ability to add/edit/delete Talks in the UI
  • Incorporate recent code changes - tabs for past/upcoming events, etc
  • In the Melbourne views, filter by region and event_type
  • fix: HTML is showing up in the description when saving it
  • Remove the date field and create a date method that just uses start_time (no need to have duplicate date and start_time fields)
  • Need ability to add/edit Venues in the UI

Thanks to @mcgain for advising! 🙏 🎉

Screenshots:

Clone of the Melbourne event/show page, using events table, with Edit and Delete buttons:

DatabaseEvent page with Edit and Delete Events

New/Edit Event form:

DatabaseEvent Edit form

Clone of the Melbourne events page, using events table, with New button:

DatabaseEvent list with New Event button

Clone of the Melbourne home page, using events table:

DatabaseEvents home

Comment thread db/migrate/20260707045525_create_events_and_import_from_yaml.rb Outdated
Comment thread db/migrate/20260707045525_create_events_and_import_from_yaml.rb Outdated
Comment thread app/frontend/stylesheets/melbourne_application.scss
Comment thread db/migrate/20260707045525_create_events_and_import_from_yaml.rb Outdated
Comment thread sites/melbourne/app/controllers/database_events_controller.rb Outdated
Comment thread sites/melbourne/app/presenters/event_presenter.rb Outdated
@kcomandich
kcomandich force-pushed the feature/events_architecture branch 4 times, most recently from c8b6c90 to 0b8ef91 Compare July 8, 2026 02:52

@mcgain mcgain left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bunch of nit-picking sorry, but they are worth addressing

Comment thread app/models/database_event.rb Outdated
Comment thread app/models/database_event.rb Outdated
Comment thread sites/melbourne/app/controllers/database_events_controller.rb Outdated
Comment thread db/migrate/20260707045525_create_events_and_import_from_yaml.rb Outdated
Comment thread db/migrate/20260707045525_create_events_and_import_from_yaml.rb Outdated
Comment thread sites/melbourne/app/controllers/database_events_controller.rb Outdated

@mcgain mcgain left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one more

Comment thread db/migrate/20260707045525_create_events_and_import_from_yaml.rb Outdated
@kcomandich
kcomandich force-pushed the feature/events_architecture branch 5 times, most recently from 1e2f75e to 2360201 Compare July 21, 2026 02:42
@kcomandich
kcomandich marked this pull request as ready for review July 21, 2026 03:11
@kcomandich
kcomandich requested a review from a team as a code owner July 21, 2026 03:11
@leesheppard
leesheppard requested a review from HashNotAdam July 25, 2026 03:33
@kcomandich
kcomandich force-pushed the feature/events_architecture branch 3 times, most recently from 800ec75 to 50eb16d Compare August 4, 2026 05:05
@leesheppard
leesheppard force-pushed the feature/events_architecture branch from 50eb16d to db5f7c4 Compare August 4, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants