Rails not respecting primary keys

There is some issue with Ruby on Rails not respecting primary key and other settings on columns when it does a schema dump of the db. It does this when you use a non-standard id column e.g. tablename_id and not just id.

There is a patch floating about that fixes this but a simpler way is to uncomment config.active_record.schema_format = :sql in your environment.rb. It then uses SQL and not Ruby for your schema and it respects your databases.

Viewing 1 Comment

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus