Migration step with create_table with string column with :default => "" fails
due to missing default value in SQL
-----------------------------------------------------------------------------------------------------------------
Key: JRUBY-2996
URL: http://jira.codehaus.org/browse/JRUBY-2996
Project: JRuby
Issue Type: Bug
Components: ActiveRecord-JDBC
Affects Versions: ActiveRecord-JDBC 0.8.2
Environment: Fedora Linux 9, Sun Java 1.6.0_06, JRuby 1.1.4, AR-JDBC
0.8.2
Reporter: Uwe Kubosch
Attachments: derby_migration_test.rb
A test case is attached to this issue.
[EMAIL PROTECTED] activerecord-jdbc]$ rake test_derby
(in /home/uwe/workspace/aifudis/activerecord-jdbc)
You really need Hoe installed to be able to package this gem
Loaded suite
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
Started
....E.................
Finished in 6.455585 seconds.
1) Error:
test_create_table_column_quoting_vs_keywords(DerbyQuotingTest):
ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError: Syntax error:
Encountered "NOT" at line 1, column 114.: CREATE TABLE dummies (id int
generated by default as identity NOT NULL PRIMARY KEY, "year" varchar(256)
DEFAULT NOT NULL)
/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'
/home/uwe/workspace/aifudis/activerecord-jdbc/lib/active_record/connection_adapters/jdbc_adapter.rb:537:in
`execute'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:108:in
`create_table'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/migration.rb:346:in
`method_missing'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/migration.rb:326:in
`say_with_time'
/usr/local/jruby-1.1.4/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/migration.rb:326:in
`say_with_time'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/migration.rb:342:in
`method_missing'
/home/uwe/workspace/aifudis/activerecord-jdbc/./test/derby_migration_test.rb:6:in
`up'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/migration.rb:280:in
`migrate'
/usr/local/jruby-1.1.4/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/migration.rb:280:in
`migrate'
/usr/local/jruby-1.1.4/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/migration.rb:263:in
`up_with_benchmarks'
/home/uwe/workspace/aifudis/activerecord-jdbc/./test/derby_migration_test.rb:18:in
`test_create_table_column_quoting_vs_keywords'
22 tests, 34 assertions, 0 failures, 1 errors
rake aborted!
Command failed with status (1): [/usr/local/jruby-1.1.4/bin/jruby -Ilib:tes...]
(See full trace by running task with --trace)
[EMAIL PROTECTED] activerecord-jdbc]$
--
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