Schema dump corrupts date defaults in mysql

Hey, looks pretty messy out here the last two days…so please let me
know
if this is known, or if you can confirm.

Just upped to Rails 1.1. When I run rake test I get:

rake aborted!
./db/schema.rb:17: parse error, unexpected kEND
./db/schema.rb:21: parse error, unexpected $, expecting kEND

(See full trace by running task with --trace)

Uggly. In schema.rb:
t.column “valid_until”, :date, :default => #<Date: 4976867/2,0,2299161>

Whoa, an object ID? that can’t be right…and if I change schema.rb to
a
string, rake re-writes the damn thing before running the tests anyway.
Is
this confirmed/disprooved? Is it something I may be doing wrong?

The rake --trace follows, thank all.


Matthew B. :: 607 227 0871
Resume & Portfolio @ http://madhatted.com

** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:prepare
** Invoke db:test:clone (first_time)
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Execute db:test:clone
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
rake aborted!
./db/schema.rb:17: parse error, unexpected kEND
./db/schema.rb:21: parse error, unexpected $, expecting kEND
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:129:in
load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:129:inload’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/tasks/databases.rake:31
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:202:in invoke' /usr/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:in invoke' /usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/tasks/databases.rake:71 /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:202:ininvoke’
/usr/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:ininvoke’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/tasks/databases.rake:138
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:202:in invoke' /usr/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:in invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:209:ininvoke_prerequisites’/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:844:in
each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:208:ininvoke_prerequisites’/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:201:in
invoke' /usr/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:in invoke' /usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/tasks/testing.rake:28 /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:202:ininvoke’
/usr/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:ininvoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/bin/rake:7
/usr/bin/rake:18

I’m having simular issuse with the generation of schema.rb. for me it
is changing double columns to floats.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs