Sha256: 23691a201982aa02db50ae71f2293ccafe0773f3b0b56b7e9a004873d39127a3

Contents?: true

Size: 478 Bytes

Versions: 25

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

class DropEmailsOnNotificationsFlagFromUser < ActiveRecord::Migration[5.1]
  class DecidimUser < ApplicationRecord
    self.table_name = :decidim_users
  end

  def change
    # rubocop:disable Rails/SkipsModelValidations
    DecidimUser.where(email_on_notification: true).update_all(notifications_sending_frequency: "real_time")
    # rubocop:enable Rails/SkipsModelValidations

    remove_column :decidim_users, :email_on_notification
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-core-0.29.1 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.28.4 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.27.9 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.29.0 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.28.3 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.27.8 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.29.0.rc4 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.29.0.rc3 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.29.0.rc2 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.29.0.rc1 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.28.2 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.27.7 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.28.1 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.27.6 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.28.0 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.27.5 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.28.0.rc5 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.28.0.rc4 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.27.4 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
decidim-core-0.27.3 db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb