Apparently config.active_record.schema_format = :sql in environment.rb
was the trick I was looking for.

Not very obvious.  Not obvious that your test DB schema will be
different than your dev/prod schema should you start putting weird
stuff in your migrations.

=Blair.

On Apr 28, 1:32 pm, blgroup <[email protected]> wrote:
> Is it possible to get the generated schema.rb to include accurately
> reflect your database's schema?
>
> For example, when using usesguid plugin, we change the primary key
> from id, int(11), autoincrement to say, guid, varchar(22)
>
> The schema file picks up the change of id to guid, but not the type.
> So when the test DB is created from schema.rb, the guid column is int
> (11) autoincrement.  This causes havoc with unit tests and does not
> accurately depict the production environment.
>
> How do people deal with this?  It's driving me crazy.
>
> Similarly, adding a new column as integer autoincrement that is not
> the primary key is also not reflected in schema.rb and completely
> breaks fixtures.
>
> Any help would be appreciated,
>
> Thanks,
> =Blair.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to