Rake problem with binary tables

Hello,

Excuse me if this is obvious. I have tried to find an answer to this
problem without luck. A google search does not seem to show this as a
common problem. I have an existing database, with a schema that has
binary columns, and a default value for those columns (in this case
“0000000000000000”).

I am trying to extract the schema using “rake --trace db:schema:dump”,
and am getting the following error:

** Execute db:schema:dump
rake aborted!
binary columns cannot have a default value: “0000000000000000”

Clearly it does not like default binary values; but why is this?
Should I be doing something different in order to hook ROR up to my
existing database?

Thanks in advance,

Oliver

This seems to be a bug, add a ticket at the Rails lighthouse →
http://rails.lighthouseapp.com/dashboard

On Sat, Oct 25, 2008 at 10:54 PM, oliver [email protected]
wrote:

I am trying to extract the schema using “rake --trace db:schema:dump”,
Thanks in advance,

Oliver


Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)
João Pessoa, PB, +55 83 8867-7208

Thank you Maurício, would you happen to have a suggestion for a
workaround in the mean time?

Oliver

On Oct 26, 3:49 am, “Maurício Linhares” [email protected]

On Oct 26, 6:01 pm, oliver [email protected] wrote:

Thank you Maurício, would you happen to have a suggestion for a
workaround in the mean time?

This is probably an artefact of the fact that mysql blob columns
genuinely cannot have defaults (http://dev.mysql.com/doc/refman/5.0/en/
blob.html). BINARY/VARBINARY columns can, but rails does not
differentiate between binary and blob - it would recreate the column
as a blob and so defaults don’t make sense)

Fred