You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20200424080753_generate_web_notifications.rb
    path of file: ./repos/open-build-service/src/api/db/data
    
    the code of the file until where you have to start completion: class GenerateWebNotifications < ActiveRecord::Migration[6.0]
  def up
    Notification.update(rss: true, web: true)
    update_existent_event_subscriptions
    generate_subscripitions
  end

  def down
    raise ActiveRecord::IrreversibleMigration
  end

  private

  def update_existent_event_subscriptions
    enabled_subscriptions = EventSubscription.where(channel: :instant_email)
    enabled_subscriptions.update(e
    
  def create_subscription_for_channel(subscription, channel)
    return if eventtype_disabled_for_web_and_rss?(subscription.eventtype)

    subscription = EventSubscription.find_or_initialize_by(user_id: subscription.user_id,
                                                           group_id: subscription.group_id,
                                                           receiver_role: subscription.receiver_role,
                                                           eventtype: subscription.eventtype,
                                                           channel: channel)
    subscription.enabled = true
    subscription.save!
  end