Commit 094cd21c authored by Stan Hu's avatar Stan Hu

Fix missing quote_table_name

parent cee69f89
...@@ -4,7 +4,7 @@ class RemoveDuplicatedKeys < ActiveRecord::Migration ...@@ -4,7 +4,7 @@ class RemoveDuplicatedKeys < ActiveRecord::Migration
select_all("SELECT fingerprint FROM #{quote_table_name(:keys)} GROUP BY fingerprint HAVING COUNT(*) > 1").each do |row| select_all("SELECT fingerprint FROM #{quote_table_name(:keys)} GROUP BY fingerprint HAVING COUNT(*) > 1").each do |row|
fingerprint = connection.quote(row['fingerprint']) fingerprint = connection.quote(row['fingerprint'])
execute(%Q{ execute(%Q{
DELETE FROM keys DELETE FROM #{quote_table_name(:keys)}
WHERE fingerprint = #{fingerprint} WHERE fingerprint = #{fingerprint}
AND id != ( AND id != (
SELECT id FROM ( SELECT id FROM (
......
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