Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #1787 (closed defect: duplicate)

Opened 3 years ago

Last modified 3 years ago

[PATCH] Change Oracle sequences to #{table_name}_seq

Reported by: mschoen Assigned to: David
Priority: normal Milestone: 1.0
Component: ActiveRecord Version: 0.13.1
Severity: normal Keywords: oracle, sequences, rails_sequence
Cc:

Description

Current implementation uses a single sequence "rails_sequence" to generate the id values for all tables. Comments in the code indicate this was done because the author couldn't determine a way to get table-specific sequences.

I cloned what's done in the postgres adapter, to achieve what's generally used as a standard in the Oracle world, which is to name the sequence after the table.

NOTE: this change is NOT backwards-compatible. However, it's easy to make work; just create a sequence for each table.

On the mailing list John Higgins had an idea about a more flexible approach, in which a regexp pattern is used to describe the name of the sequences. But that's beyond me at this point, and I think this patch is at least an improvement.

Attachments

oci_table_seq.patch (8.4 kB) - added by mschoen on 07/20/05 17:30:11.
Patch file (from svn diff)

Change History

07/20/05 17:30:11 changed by mschoen

  • attachment oci_table_seq.patch added.

Patch file (from svn diff)

07/21/05 18:05:29 changed by mschoen

  • status changed from new to closed.
  • resolution set to duplicate.

Obsolete, see Ticket #1798