PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/db/migrate/20090516133313_add_host_info_columns_to_host.rb

http://vmaki.googlecode.com/
Ruby | 27 lines | 26 code | 1 blank | 0 comment | 0 complexity | 6d1899cf4668ef1e681bf8f51738c8fa MD5 | raw file
Possible License(s): LGPL-2.1
  1. class AddHostInfoColumnsToHost < ActiveRecord::Migration
  2. def self.up
  3. add_column :hosts, :cpus, :integer
  4. add_column :hosts, :cores, :integer
  5. add_column :hosts, :total_memory, :integer
  6. add_column :hosts, :memory, :integer
  7. add_column :hosts, :mhz, :integer
  8. add_column :hosts, :model, :string
  9. add_column :hosts, :nodes, :integer
  10. add_column :hosts, :sockets, :integer
  11. add_column :hosts, :threads, :integer
  12. add_column :hosts, :hvm_support, :boolean
  13. end
  14. def self.down
  15. remove_column :hosts, :cpus
  16. remove_column :hosts, :cores
  17. remove_column :hosts, :total_memory
  18. remove_column :hosts, :memory
  19. remove_column :hosts, :mhz
  20. remove_column :hosts, :model
  21. remove_column :hosts, :nodes
  22. remove_column :hosts, :sockets
  23. remove_column :hosts, :threads
  24. remove_column :hosts, :hvm_support
  25. end
  26. end