mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
add index
This commit is contained in:
parent
a23a04a1e5
commit
c552f846ae
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue