Update from 1.4.1 to 2.3 (db migration) and db fixes (pgsql)

Added by Leonid Eletskikh over 4 years ago

Hello colleagues,

I have several problems updating my private Redmine from 1.4.1 to 2.3.

This Redmine has a very long history and it was moved from one to another server several times (w/o any updates but with migration from MySQL to pgSQL). For now in v.1.4.1 I am already enable to create User Groups (got server error).

And now I need this upgrade, but applying db dump with

pg_dump -U user_redmine -f /home/user/bin/dump_redmine.sql

psql -U user_redmine user < /home/user/bin/dump_redmine.sql

rake db:migrate RAILS_ENV=production 

rake redmine:plugins:migrate RAILS_ENV=production 

I've got absolutely useless redmine — almost 50% of functions are disabled and leads to server error.

What should I do in this case?

Replies (4)

RE: Update from 1.4.1 to 2.3 (db migration) and db fixes (pgsql) - Added by Leonid Eletskikh over 4 years ago

e.g.

Processing GroupsController#new (for 109.188.126.96 at 2013-04-18 14:26:55) [GET]
  Parameters: {"controller"=>"groups", "action"=>"new"}
Rendering template within layouts/admin
Rendering groups/new
Completed in 40ms (View: 34, DB: 5) | 200 OK [http://link.sl/groups/new]

Processing GroupsController#create (for 109.188.126.96 at 2013-04-18 14:27:00) [POST]
  Parameters: {"authenticity_token"=>"wrSEnnbUPe6QCfcN3dJFerxu/wsbU79w6YF9RCNcZG0=", "controller"=>"groups", "action"=>"create", "group"=>{"lastname"=>"ew"}, "commit"=>"Create"}

ActiveRecord::StatementInvalid (PG::Error: ERROR:  null value in column "mail_notification" violates not-null constraint
: INSERT INTO "users" ("lastname", "mail_notification", "hashed_password", "firstname", "admin", "updated_on", "last_login_on", "created_on", "identity_url", "login", "salt", "mail", "language", "status", "auth_source_id", "type") VALUES('ew', NULL, '', '', 'f', '2013-04-18 14:27:00.358096', NULL, '2013-04-18 14:27:00.358096', NULL, '', NULL, '', NULL, 1, NULL, 'Group') RETURNING "id"):
  app/controllers/groups_controller.rb:69:in `create'
  app/controllers/groups_controller.rb:68:in `create'
  passenger (3.0.9) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.9) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  passenger (3.0.9) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:99:in `spawn_application'
  passenger (3.0.9) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:84:in `spawn_application'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:230:in `spawn_rails_application'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.9) helper-scripts/passenger-spawn-server:99

Rendering /home/user/webapps/redmine_141/redmine/public/500.html (500 Internal Server Error)

How I can fix it?

RE: Update from 1.4.1 to 2.3 (db migration) and db fixes (pgsql) - Added by Gleidson Porto over 4 years ago

Hello,

I have the same problem. I had a 1.4 and try to migrate to a new server. But i got the same problems with navigation.
Did you resolved that? Can you help me?

Tks,

Gleidson

RE: Update from 1.4.1 to 2.3 (db migration) and db fixes (pgsql) - Added by Leonid Eletskikh over 4 years ago

Hello Gleidson,

I have resolved my problem correcting one of the table in Postgress db. I was looking for "mail_notification" entry in case of null value in column
You can post your error log we'll try to help you.

btw, you can try $ rake db:migrate RAILS_ENV=production

(1-4/4)