Sha256: afb81322800370b9add6c9e4cf23829b5445d1c431a87d068fef6975943c7eb2

Contents?: true

Size: 374 Bytes

Versions: 5

Compression:

Stored size: 374 Bytes

Contents

class UpdateOsMinor  < ActiveRecord::Migration

  class Operatingsystem < ActiveRecord::Base; end

  def self.up
    Operatingsystem.update_all("minor = ''", {:minor => nil})
    change_column :operatingsystems, :minor, :string, :limit => 16, :default => "", :null => false
  end

  def self.down
    change_column :operatingsystems, :minor, :string, :limit => 16
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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