Project

General

Profile

Issue with Oracle install- AS keyword in table alias

Added by James Tedrick about 14 years ago

Hello,

I'm trying to get Redmine up & running on a Win 2K3 Server box connecting to an Oracle 10g db. I get the following error in rake db:migrate :

BuildProjectsTree: migrating ============================================
rake aborted!
An error has occurred, all later migrations canceled:

OCIError: ORA-00905: missing keyword: SELECT count(*) AS count_all FROM projects
LEFT OUTER JOIN projects AS parent ON projects.parent_id = parent.id WHERE (pr
ojects.lft IS NULL OR projects.rgt IS NULL OR projects.lft >= projects.rgt OR (p
rojects.parent_id IS NOT NULL AND (projects.lft <= parent.lft OR projects.rgt >=
parent.rgt)))

(See full trace by running task with --trace)

The SQL query has an AS in the table alias, which is not supported by Oracle.

Looking at the BuildProjectsTree step, the only thing that seems to happen is Project.rebuild!

I'm a newbie with ruby & rails- where could I find the definition of this function and tweak the query or otherwise be pointed to a solution?

If it matters (the error occurs with both adapters):
  • LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activerecord-oracle-adapter (1.0.0.9250)
activerecord-oracle_enhanced-adapter (1.2.3)
activeresource (2.3.5)
activesupport (2.3.5, 2.3.3)
cgi_multipart_eof_fix (2.5.0)
gem_plugin (0.2.3)
mongrel (1.1.5)
mongrel_service (0.3.4)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
ruby-oci8 (1.0.7)
win32-service (0.5.2)