fix buggy migration that caused attempts to set the boundary field in workspace before it existed, fixes #1724
git-svn-id: file:///home/svn/framework3/trunk@9269 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
29c222d575
commit
0c1878f620
|
@ -12,8 +12,15 @@ class AddWorkspaces < ActiveRecord::Migration
|
||||||
|
|
||||||
remove_index :hosts, :column => :address
|
remove_index :hosts, :column => :address
|
||||||
|
|
||||||
w = Msf::DBManager::Workspace.default
|
#
|
||||||
Msf::DBManager::Host.update_all ["workspace_id = ?", w.id]
|
# This was broken after 018_add_workspace_user_info was introduced
|
||||||
|
# because of the new boundary column. For some reason, the
|
||||||
|
# find_or_create_by_name that .default eventually calls here tries to
|
||||||
|
# create a record with the boundary field that doesn't exist yet.
|
||||||
|
# See #1724
|
||||||
|
#
|
||||||
|
#w = Msf::DBManager::Workspace.default
|
||||||
|
#Msf::DBManager::Host.update_all ["workspace_id = ?", w.id]
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
|
@ -26,4 +33,4 @@ class AddWorkspaces < ActiveRecord::Migration
|
||||||
add_index :hosts, :address, :unique => true
|
add_index :hosts, :address, :unique => true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue