Sha256: 5fc719f7a479c9bb0e7ac3b0db7e72b31cae66e90f24b72c588e7b11e0cbffef

Contents?: true

Size: 325 Bytes

Versions: 12

Compression:

Stored size: 325 Bytes

Contents

# -*- encoding : utf-8 -*-

class EnabledRoles < Card::Migration::Core
  def up
    ensure_trait "*enabled roles", "enabled_roles",
                 default: { type_id: Card::SessionID }

    Card.search type_id: Card::SessionID do |card|
      card.update_column :trash, true unless card.codename.present?
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
card-1.100.0 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.99.6 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.99.5 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.99.4 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.99.3 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.99.2 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.99.1 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.99.0 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.98.3 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.98.2 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.98.1 db/migrate_core_cards/20190528131330_enabled_roles.rb
card-1.98.0 db/migrate_core_cards/20190528131330_enabled_roles.rb