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.
Bb9b64ca55cde805279a8b5b7b253af8?d=identicon&s=25 Rob Sargent (iceback)
on 2008-10-08 21: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?
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-08 21:39
(Received via mailing list)
On Oct 8, 8:29 pm, Rob Sargent <rails-mailing-l...@andreas-s.net>
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
Bb9b64ca55cde805279a8b5b7b253af8?d=identicon&s=25 Rob Sargent (iceback)
on 2008-10-08 22:00

Frederick Cheung wrote:
> On Oct 8, 8:29�pm, Rob Sargent <rails-mailing-l...@andreas-s.net>
> 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
Bb9b64ca55cde805279a8b5b7b253af8?d=identicon&s=25 Rob Sargent (iceback)
on 2008-10-08 22:41
Rob Sargent wrote:
>
>
> Frederick Cheung wrote:
>> On Oct 8, 8:29�pm, Rob Sargent <rails-mailing-l...@andreas-s.net>
>> 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?
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-09 10:12
(Received via mailing list)
On 8 Oct 2008, at 21:41, Rob Sargent 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
Bb9b64ca55cde805279a8b5b7b253af8?d=identicon&s=25 Rob Sargent (iceback)
on 2008-10-10 01:30
Frederick Cheung wrote:
> On 8 Oct 2008, at 21:41, Rob Sargent 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.