Closed dr-brown closed 10 years ago
did you migrate correctly?
I migrate Redmine and the plugins with the following lines: rake db:migrate RAILS_ENV=production rake tmp:cache:clear rake tmp:sessions:clear set RAILS_ENV=production rake redmine:plugins:migrate
I'm not sure but the code in /db/migrate/20130710182539_add_queries_visibility.rb look like the is_public column is migrated to the visibility column: class AddQueriesVisibility < ActiveRecord::Migration def up add_column :queries, :visibility, :integer, :default => 0 Query.where(:is_public => true).update_all(:visibility => 2) remove_column :queries, :is_public end
def down add_column :queries, :is_public, :boolean, :default => true, :null => false Query.where('visibility <> ?', 2).update_all(:is_public => false) remove_column :queries, :visibility end end
Best regards
Please provide the stack trace of your error. Maybe some of your files are outdated?
The problem occurs only in the trunk version, not branch 2.3.3. Here is the trace: Started GET "/tt_bookings_list" for 127.0.0.1 at 2013-10-08 15:08:53 +0200 Processing by TtBookingsListController#index as HTML Current user: jmh (id=3) Rendered plugins/redmine_time_tracker/app/views/tt_overview/_time_tracker.js.erb (219.0ms) Rendered queries/_filters.html.erb (575.0ms) Rendered queries/_columns.html.erb (3.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (977.1ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (40.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (28.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (32.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (37.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (32.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (32.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (32.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (34.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (58.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (28.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (29.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (29.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (26.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (32.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (26.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (32.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (59.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (29.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (26.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (28.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (31.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (30.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (30.0ms) Rendered plugins/redmine_time_tracker/app/views/time_bookings/_list_entry.html.erb (28.0ms) Rendered plugins/redmine_time_tracker/app/views/tt_bookings_list/_list.html.erb (1954.1ms) Rendered plugins/redmine_time_tracker/app/views/tt_bookings_list/index.html.erb within layouts/base (3035.2ms) Completed 500 Internal Server Error in 4276ms
ActionView::Template::Error (Mysql2::Error: Unknown column 'queries.is_public' in
'where clause': SELECT queries
.id
AS t0_r0, queries
.project_id
AS t0_r1,
queries
.name
AS t0_r2, queries
.filters
AS t0_r3, queries
.user_id
AS t0_r4, queries
.column_names
AS t0_r5, queries
.sort_criteria
AS t0_r6,
queries
.group_by
AS t0_r7, queries
.type
AS t0_r8, queries
.tt_query_type
AS t0_r9, queries
.visibility
AS t0_r10, queries
.options
AS t0_r11,
projects
.id
AS t1_r0, projects
.name
AS t1_r1, projects
.description
AS t1_r2, projects
.homepage
AS t1_r3, projects
.is_public
AS t1_r4, projects
.
parent_id
AS t1_r5, projects
.created_on
AS t1_r6, projects
.updated_on
AS t1_r7, projects
.identifier
AS t1_r8, projects
.status
AS t1_r9, projects
.
lft
AS t1_r10, projects
.rgt
AS t1_r11, projects
.inherit_members
AS t1_r12
FROM queries
LEFT OUTER JOIN projects
ON projects
.id
= queries
.project_id
WHERE queries
.type
IN ('TimeBookingQuery') AND ((queries.project_id IS NULL OR
(projects.status = 1)) AND (queries.is_public = 1 OR queries.user_id = 3)) AND
(project_id IS NULL) ORDER BY queries.name ASC):
65: <% end %>
66:
67: <% content_for :sidebar do %>
68: <%= render_sidebar_queries %>
69: <% end %>
70:
71: <%= context_menu tt_bookings_list_context_menu_path %>
app/helpers/issues_helper.rb:229:in render_sidebar_queries' app/helpers/application_helper.rb:1178:in
content_for'
ok it seems like the problem is, that someone on your redmine saved a query in an old version an now its outdated an causes this issues. This is a serious problem and should be fixed, but in the meantime you can try to find the specific query and delete.
The specific query comes from the redmine code. I've checked out a clean version of the trunk an create a db from it and the is_public column is not present in the schema.rb and therefore also not in the db. Since git revison 1019 (svn-revison 11994) the is_public column is migrated to the visibility column. Please see: https://github.com/redmine/redmine/commit/888c3581eb0fbfc5ede87a24f7f03bfa4f7d810b For instance in the /app/models/query.rb you can see that the visibility column takes on the task of the is_public column. There are three new defines for these function: VISIBILITY_PRIVATE = 0 VISIBILITY_ROLES = 1 VISIBILITY_PUBLIC = 2 This corresponds to the db migration file of this revision: https://github.com/redmine/redmine/blob/master/db/migrate/20130710182539_add_queries_visibility.rb
Woah, wait. Now i understand. Please don't use the redmine devel version. We only tested this with redmine 2.3.1 or 2.3.2 and if i remember correctly someone said it works fine with stable 2.3.3 We will try to fix all problems, if the new redmine version is stable.
Hello,
if I want to go to the Bookings, Time Logs or Reports tab I get the following error: "ActionView::Template::Error (Mysql2::Error: Unknown column 'queries.is_public'" ... Probably it is because that in revision 11994 the file 20130710182539_add_queries_visibility.rb was introduced and this file removes the column "is_public".
My Redmine version is 2.3.3.devel.12160
Best regards George