hcb
hcb copied to clipboard
[Event::Configuration] Add unique index on `event_id`
We don't want multiple Event::Configurations per Event. So, let's add a unique index on event_configurations.event_id. A Rails validation would also be nice
class Event::Configuration
validates :event, uniqueness: true
end
https://hcb.hackclub.com/blazer/queries/998-duplicate-event-configuration
Before merging a PR, we need to fix the production data and merge duplicate configurations
Should we make a one time job that deletes the less recently updated config of all these events?