Sha256: 59fbbc7fcb9d3a41b614df582b033521d3f5fe387f2cc8c470e669e10fb81230
Contents?: true
Size: 573 Bytes
Versions: 22
Compression:
Stored size: 573 Bytes
Contents
# frozen_string_literal: true class AddNotificationTypesToUsers < ActiveRecord::Migration[5.2] class UserBaseEntity < ApplicationRecord self.table_name = :decidim_users self.inheritance_column = nil # disable the default inheritance end def change add_column :decidim_users, :notification_types, :string, default: "all" # rubocop:disable Rails/SkipsModelValidations UserBaseEntity.update_all(notification_types: "all") # rubocop:enable Rails/SkipsModelValidations change_column_null :decidim_users, :notification_types, false end end
Version data entries
22 entries across 22 versions & 1 rubygems