mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
add index
This commit is contained in:
parent
a23a04a1e5
commit
c552f846ae
@ -431,7 +431,7 @@ class ImportScripts::Lithium < ImportScripts::Base
|
|||||||
|
|
||||||
|
|
||||||
puts "loading data into temp table"
|
puts "loading data into temp table"
|
||||||
PostAction.exec_sql("create temp table accepted_data(post_id int)")
|
PostAction.exec_sql("create temp table accepted_data(post_id int primary key)")
|
||||||
PostAction.transaction do
|
PostAction.transaction do
|
||||||
results.each do |result|
|
results.each do |result|
|
||||||
|
|
||||||
@ -446,6 +446,7 @@ class ImportScripts::Lithium < ImportScripts::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
puts "deleting dupe answers"
|
puts "deleting dupe answers"
|
||||||
PostAction.exec_sql <<-SQL
|
PostAction.exec_sql <<-SQL
|
||||||
DELETE FROM accepted_data WHERE post_id NOT IN (
|
DELETE FROM accepted_data WHERE post_id NOT IN (
|
||||||
|
Loading…
Reference in New Issue
Block a user