activerecord jdbc derby adapter should quote columns called "year"
------------------------------------------------------------------
Key: JRUBY-2995
URL: http://jira.codehaus.org/browse/JRUBY-2995
Project: JRuby
Issue Type: Bug
Components: ActiveRecord-JDBC
Affects Versions: ActiveRecord-JDBC 0.8.2
Environment: JRuby 1.1.4, activerecord.jdbc-0.8.2, sun java 1.6.0_06,
derby 10.4
Reporter: Uwe Kubosch
Priority: Minor
When creating a table with a column called "year" in a migration script and
running it against derby using the activerecord-jdbc-derby adapter, the
migration step fails with the error:
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:147:in
`log': ActiveRecord::ActiveRecordError: Syntax error: Encountered "year" at
line 1, column 153.: CREATE TABLE attendances (id int generated by default as
identity NOT NULL PRIMARY KEY, member_id integer NOT NULL, group_schedule_id
integer NOT NULL, year integer NOT NULL, week integer NOT NULL, created_at
timestamp, updated_at timestamp) (ActiveRecord::StatementInvalid)
The "year" column should be quoted since it is a reserved word in derby.
If there is a workaround for this, please let me know.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email