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

Ticket #11604 (new defect)

Opened 4 weeks ago

[PATCH] schema_dumper with sqlite adapter should honor nonstandard primary keys (implement pk_and_sequence_for)

Reported by: dharding Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords:
Cc:

Description

If you create a table with a primary key named something other than 'id' and are using the sqlite(3) adapter, schema_dumper will not honor the primary key column name.

I have attached a patch that adds the pk_and_sequence_for method to the sqlite adapter.

Attachments

add_pk_and_sequence_for_method_to_sqlite_adapter.diff (1.6 kB) - added by dharding on 04/22/08 17:12:15.
add_pk_and_sequence_for_to_sqlite.patch (2.1 kB) - added by dharding on 04/23/08 19:11:01.
Same patch as above, but created via git

Change History

04/22/08 17:12:15 changed by dharding

  • attachment add_pk_and_sequence_for_method_to_sqlite_adapter.diff added.

04/23/08 19:11:01 changed by dharding

  • attachment add_pk_and_sequence_for_to_sqlite.patch added.

Same patch as above, but created via git