Sha256: ddae04d4de64b49e4e707e6ee10a59ad1c589e630e13c81c49b9d567d6f97a1b

Contents?: true

Size: 204 Bytes

Versions: 5

Compression:

Stored size: 204 Bytes

Contents

class EnsureAllHostnamesAreLowercase < ActiveRecord::Migration
  def self.up
    execute "UPDATE hosts SET name=LOWER(name)"
  end

  def self.down
    raise ActiveRecord::IrreversibleMigration
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/db/migrate/20111227095806_ensure_all_hostnames_are_lowercase.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/db/migrate/20111227095806_ensure_all_hostnames_are_lowercase.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/db/migrate/20111227095806_ensure_all_hostnames_are_lowercase.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/db/migrate/20111227095806_ensure_all_hostnames_are_lowercase.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/db/migrate/20111227095806_ensure_all_hostnames_are_lowercase.rb