Forum: Ruby on Rails schema.dump chokes on RAW type

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rob S. (Guest)
on 2008-10-08 23:29
I haven't seen anyone mention this yet.

The tail end of the migration process is a call to schema.dump.  Our
primary keys are uuids and these choke schema.dump on both oracle and
postgres.  The latter fails silently (skips three tables) while the
former complains about the RAW(16) in each of the three tables.

Anyone had a similar experience?
Frederick C. (Guest)
on 2008-10-08 23:39
(Received via mailing list)
On Oct 8, 8:29 pm, Rob S. <removed_email_address@domain.invalid>
wrote:
> I haven't seen anyone mention this yet.
>
> The tail end of the migration process is a call to schema.dump.  Our
> primary keys are uuids and these choke schema.dump on both oracle and
> postgres.  The latter fails silently (skips three tables) while the
> former complains about the RAW(16) in each of the three tables.
>
> Anyone had a similar experience?

If you are using stuff the ruby schema dumper does not understand you
may just have to switch the schema dumper format to :sql (in
environment.rb), although this does tend to kill cross database
compatibility.

Fred
Rob S. (Guest)
on 2008-10-09 00:00

Frederick C. wrote:
> On Oct 8, 8:29�pm, Rob S. <removed_email_address@domain.invalid>
> wrote:
>
> If you are using stuff the ruby schema dumper does not understand you
> may just have to switch the schema dumper format to :sql (in
> environment.rb), although this does tend to kill cross database
> compatibility.
>
> Fred

OK, I'll look into that.  Thank
Rob S. (Guest)
on 2008-10-09 00:41
Rob S. wrote:
>
>
> Frederick C. wrote:
>> On Oct 8, 8:29�pm, Rob S. <removed_email_address@domain.invalid>
>> wrote:
>>
>> If you are using stuff the ruby schema dumper does not understand you
>> may just have to switch the schema dumper format to :sql (in
>> environment.rb), although this does tend to kill cross database
>> compatibility.
>>
>> Fred
>
> OK, I'll look into that.  Thank

Setting 'config.active_record.schema_format = :sql' in environment.rb
appears to have turned dump off altogether.  Was that the expected
result?
Frederick C. (Guest)
on 2008-10-09 12:12
(Received via mailing list)
On 8 Oct 2008, at 21:41, Rob S. wrote:

>>> may just have to switch the schema dumper format to :sql (in
>>> environment.rb), although this does tend to kill cross database
>>> compatibility.
>>>
>>> Fred
>>
>> OK, I'll look into that.  Thank
>
> Setting 'config.active_record.schema_format = :sql' in environment.rb
> appears to have turned dump off altogether.  Was that the expected
> result?

Yes. Instead db/development.sql (if you are doing this in the
development environment) is populated. IIRC it's not automatically
updated after migrations have run.

Fred
Rob S. (Guest)
on 2008-10-10 03:30
Frederick C. wrote:
> On 8 Oct 2008, at 21:41, Rob S. wrote:
>
>>>> may just have to switch the schema dumper format to :sql (in
>>>> environment.rb), although this does tend to kill cross database
>>>> compatibility.
>>>>
>>>> Fred
>>>
>>> OK, I'll look into that.  Thank
>>
>> Setting 'config.active_record.schema_format = :sql' in environment.rb
>> appears to have turned dump off altogether.  Was that the expected
>> result?
>
> Yes. Instead db/development.sql (if you are doing this in the
> development environment) is populated. IIRC it's not automatically
> updated after migrations have run.
>
> Fred

Fred,  Thanks, I'm not seeing anything but the same dud schema.rb being
generated so I'm still doing something wrong (using rake db:schema:dump)
This topic is locked and can not be replied to.