Commit 500e277a authored by Kamil Trzcinski's avatar Kamil Trzcinski

Change notices during migrating

parent 265ad515
...@@ -12,10 +12,10 @@ module Ci ...@@ -12,10 +12,10 @@ module Ci
'WHERE (SELECT COUNT(*) FROM tags WHERE tags.name = ci_tags.name)=0' 'WHERE (SELECT COUNT(*) FROM tags WHERE tags.name = ci_tags.name)=0'
) )
puts 'Deleting old records' puts 'Deleting old taggings...'
connection.execute "DELETE FROM taggings WHERE context = 'tags' AND taggable_type LIKE 'Ci::%'" connection.execute "DELETE FROM taggings WHERE context = 'tags' AND taggable_type LIKE 'Ci::%'"
puts 'Inserting tags...' puts 'Inserting taggings...'
connection.execute( connection.execute(
'INSERT INTO taggings (taggable_type, taggable_id, tag_id, context) ' + 'INSERT INTO taggings (taggable_type, taggable_id, tag_id, context) ' +
"SELECT CONCAT('Ci::', ci_taggings.taggable_type), ci_taggings.taggable_id, tags.id, 'tags' FROM ci_taggings " + "SELECT CONCAT('Ci::', ci_taggings.taggable_type), ci_taggings.taggable_id, tags.id, 'tags' FROM ci_taggings " +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment