Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Unknown column 'roles.type' in 'where clause' in version 3

Unknown column 'roles.type' in 'where clause' in version 3

Added by Denis Lamotte over 11 years ago

(Mysql2::Error: Unknown column ‘roles.type’ in ‘where clause’: SELECT `roles`.* FROM `roles` WHERE `roles`.`builtin` = 0 AND `roles`.`type` = ‘Role’ ORDER BY position):

<% roles = Role.find_all_givable %>

role.rb, no STI so this is strange :(

# Find all the roles that can be given to a project member
def self.find_all_givable
find(:all, :conditions => {:builtin => 0}, :order => ‘position’)
end

the schema.rb for role is:

create_table “roles”, :force => true do |t|
t.string “name”, :limit => 30, :default => “”, :null => false
t.integer “position”, :default => 1
t.boolean “assignable”, :default => true
t.integer “builtin”, :default => 0, :null => false
t.text “permissions”
end


Replies (1)

RE: Unknown column 'roles.type' in 'where clause' in version 3 - Added by Christian Ratz over 11 years ago

Answered in https://www.openproject.org/topics/275

  • (1 - 1/1)
Loading...