Patches: Browse | Submit New | Admin

[#21974] Oracle JDBC adapter: should perform sequence creation and validation only if needed

Date:
2008-09-16 02:24
Priority:
3
Submitted By:
Nigel Ramsay (nigelramsay)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Oracle JDBC adapter: should perform sequence creation and validation only if needed

Detailed description
When calling the create_table method, you can specify {:id => false} to prevent Rails from using a primary key column.

In the Oracle JDBC adapter, the "execute" portion of the code is stopped from running if options[:id] == false.
But, some of the pre-setup parts still get run.

One of the "pre-setup" parts is a length check of the Oracle Sequence, and this will raise
an ActiveRecord::StatementInvalid. Even if the sequence is not intended to be created.

This patch now wraps both the "pre-setup" sequence name validation, and the execution with the options[:id]
check.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
jdbc_oracle.rb Patch to create_table method Download

Changes:

Field Old Value Date By
File Added4036: jdbc_oracle.rb2008-09-16 02:24nigelramsay