##// END OF EJS Templates
Fixed: PostgreSQL issues_seq_id not updated when using Trac importer....
Jean-Philippe Lang -
r1085:b0f3de5c3b75
parent child
Show More
@@ -372,6 +372,17 namespace :redmine do
372 372 migrated_custom_values += 1
373 373 end
374 374 end
375
376 # update issue id sequence if needed
377 begin
378 case ActiveRecord::Base.connection.adapter_name.downcase
379 when 'mysql'
380 # nothing to do
381 when 'postgresql'
382 sql = "SELECT setval('#{Issue.table_name}_id_seq', (SELECT MAX(id) FROM #{Issue.table_name}))"
383 ActiveRecord::Base.connection.execute(sql)
384 end
385 end
375 386 puts
376 387
377 388 # Wiki
@@ -478,7 +489,7 namespace :redmine do
478 489 if !project
479 490 # create the target project
480 491 project = Project.new :name => identifier.humanize,
481 :description => identifier.humanize
492 :description => ''
482 493 project.identifier = identifier
483 494 puts "Unable to create a project with identifier '#{identifier}'!" unless project.save
484 495 # enable issues and wiki for the created project
General Comments 0
You need to be logged in to leave comments. Login now