Skip to content

Commit

Permalink
Fixed bug in data migration (would set bad Skin id).
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed May 16, 2011
1 parent dfeeaaf commit 28bb6ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bricks/zena/zena/migrate/03_zerox1_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def migrate_nodes
NodeMig.find(:all,
:conditions => ['site_id = ? AND type = ?', id, 'Skin']
).each do |skin|
execute "UPDATE nodes SET skin_id = #{skin.id} WHERE skin = '#{skin.name}'"
execute "UPDATE nodes SET skin_id = #{skin.id} WHERE skin = '#{skin.name}' and site_id = #{id}"
end

# 2. Set _id from name
Expand Down

0 comments on commit 28bb6ae

Please sign in to comment.