Class: AddVulnAndHostCounterCaches
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddVulnAndHostCounterCaches
- Defined in:
- db/migrate/20120625000005_add_vuln_and_host_counter_caches.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
9 10 11 12 13 |
# File 'db/migrate/20120625000005_add_vuln_and_host_counter_caches.rb', line 9 def self.down remove_column :hosts, :host_detail_count remove_column :vulns, :vuln_detail_count remove_column :vulns, :vuln_attempt_count end |
.up ⇒ Object
3 4 5 6 7 |
# File 'db/migrate/20120625000005_add_vuln_and_host_counter_caches.rb', line 3 def self.up add_column :hosts, :host_detail_count, :integer, :default => 0 add_column :vulns, :vuln_detail_count, :integer, :default => 0 add_column :vulns, :vuln_attempt_count, :integer, :default => 0 end |