Update UserEmail primary key sequence when performing bulk import.

This commit is contained in:
Arpit Jalan 2017-07-25 19:15:22 +05:30
parent 5166b5460a
commit d89d279416

View File

@ -120,6 +120,7 @@ class BulkImport::Base
puts "Updating primary key sequences..."
@raw_connection.exec("SELECT setval('#{Group.sequence_name}', #{@last_group_id})")
@raw_connection.exec("SELECT setval('#{User.sequence_name}', #{@last_user_id})")
@raw_connection.exec("SELECT setval('#{UserEmail.sequence_name}', #{@last_user_email_id})")
@raw_connection.exec("SELECT setval('#{Category.sequence_name}', #{@last_category_id})")
@raw_connection.exec("SELECT setval('#{Topic.sequence_name}', #{@last_topic_id})")
@raw_connection.exec("SELECT setval('#{Post.sequence_name}', #{@last_post_id})")