[Rails-core] Be a hero: Convert Active Record fixtures to
schema.rb
Wilson Bilkovich
wilsonb at gmail.com
Fri Feb 10 20:39:56 GMT 2006
On 2/10/06, Michael Schoen <schoenm at earthlink.net> wrote:
> > Is this possible for systems (like Oracle) that don't have schema dump
> > support yet?
> > ..or did I miss some breaking news somewhere?
>
> I believe Oracle supports all the migrations methods now. If I've missed
> something please let me know.
>
Perhaps I'm just misunderstanding how this works.
I have this in environment.rb:
config.active_record.schema_format = :ruby
..and "rake db_schema_dump" produces a schema.rb file that contains only this:
ActiveRecord::Schema.define(:version => 10) do
end
The migrations themselves work fine, though.. this project was built
without any manual table creation.
Oh wait, I just figured it out. It's because the application logs in
as a user that gets to the tables via synonyms. I changed it to log
in as the DBA, and now it can (mostly) dump the schema.
I do get this error, though, right at the end:
# Could not dump table "spending_plans" because of following StandardError
# Unknown type 'LONG' for column 'comment_text'
Has that been changed since I did this setup? I remember looking at
the schema definition code for Oracle in trunk, and wondering what
LONG was all about.
Is there a way to make the schema dumper aware of synonyms?
Thanks,
--Wilson.
More information about the Rails-core
mailing list