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.
Add New Comment
Viewing 1 Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks