Sha256: 0d135dd4a82646d9acfdf1031a8e957960922ec26925f2ccef0420cda5c9de76
Contents?: true
Size: 365 Bytes
Versions: 234
Compression:
Stored size: 365 Bytes
Contents
class MigrateAdminFlagOnInvitations < ActiveRecord::Migration[5.2] def up Invitation.where(admin: true).each do |invitation| invitation.roles = [Role.admin] invitation.save end end def down InvitationRole.where(role: Role.admin).each do |invitation_role| invitation_role.invitation.update_column(:admin, true) end end end
Version data entries
234 entries across 234 versions & 1 rubygems