Files
metasploit-gs/data/sql/migrate/003_move_notes.rb
T
James Lee 3109ae1b53 add the migration for notes. fixes 742
git-svn-id: file:///home/svn/framework3/trunk@8033 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-30 16:23:40 +00:00

21 lines
476 B
Ruby

class MoveNotes < ActiveRecord::Migration
def self.up
# Remove the host requirement. We'll add the column back in below.
remove_column :notes, :host_id
change_table :notes do |t|
t.integer :workspace_id, :null => false, :default => 1
t.integer :service_id
t.integer :host_id
end
end
def self.down
remove_column :notes, :workspace_id
remove_column :notes, :service_id
change_table :notes do |t|
t.integer :host_id, :null => false
end
end
end