Sha256: d6407c2dc73c2b3564a7e2837acf1b07ed03780a159096c753c3b909dba6180e

Contents?: true

Size: 289 Bytes

Versions: 13

Compression:

Stored size: 289 Bytes

Contents

class RemoveOldDiscoveryReaderPermissions < ActiveRecord::Migration[4.2]
  def up
    Permission.where("name like '%_discovery_rules' and resource_type is null").each do |permission|
      permission.update_attributes(:resource_type => 'DiscoveryRule')
    end
  end

  def down
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
foreman_discovery-16.0.1 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-16.0.0 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-15.1.0 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-15.0.2 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-15.0.1 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-15.0.0 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-14.0.1 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-14.0.0 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-13.0.1 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-12.0.2 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-12.0.1 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-12.0.0 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb
foreman_discovery-11.0.0 db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb