Project

General

Profile

Actions

Defect #15890

closed

rake db:migrate RAILS_ENV=production doesn't update the type feild in the repository table

Added by Robin Polak almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Environment:
Redmine version 2.4.2.stable
Ruby version 1.8.7-p352 (2011-06-30) [i686-linux]
Rails version 3.2.16
Environment production
Database adapter PostgreSQL - 9.1.11
SCM:
Git 1.7.9.5
Filesystem
Redmine plugins:
notify_custom_users 0.0.6
redmine_default_assign 0.4
redmine_embedded 0.0.2

Upgrading Redmine from 1.4.4 to 2.4.2

1.4.4 type = Git
2.4.2 type = Repository::Git

Error from <redmine_home>/log/production.log:

Started GET "/projects/local-lab" for 172.16.20.202 at Thu Jan 16 22:34:09 +0400 2014
Processing by ProjectsController#show as HTML
Parameters: {"id"=>"local-lab"}
Current user: rpolak (id=47)
Rendered projects/_members_box.html.erb (2.5ms)
Rendered projects/show.html.erb within layouts/base (19.3ms)
Completed 500 Internal Server Error in 441.3ms

ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'Git'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Repository.inheritance_column to use another column for that information.):
42: <% end >
43:
44: <h1><
= page_header_title ></h1>
45:
46: <
if display_main_menu?(Herve Harster) >
47: <div id="main-menu">
48: <
= render_main_menu(Herve Harster) %>
lib/redmine.rb:255
lib/redmine/menu_manager.rb:199:in `call'
lib/redmine/menu_manager.rb:199:in `allowed_node?'
lib/redmine/menu_manager.rb:166:in `menu_items_for'
lib/redmine/menu_manager.rb:165:in `each'
lib/redmine/menu_manager.rb:165:in `menu_items_for'
lib/redmine/menu_manager.rb:90:in `render_menu'
lib/redmine/menu_manager.rb:80:in `render_main_menu'
app/views/layouts/base.html.erb:45:in `_app_views_layouts_base_html_erb__318726304__634725268'
app/controllers/projects_controller.rb:163:in `show'

Fix:
Apply to PostgreSQL DB:
update repositories set "type" = 'Repository::Git' where "type" = 'Git';

Actions

Also available in: Atom PDF