Forum: Ruby on Rails rake db_schema_dump make syntax error

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.
E6dd9cedee99f9d02e5f87d80ee0e681?d=identicon&s=25 Warren Seltzer (Guest)
on 2006-04-26 23:22
(Received via mailing list)
rake migrate bug with datetime:

   > rake db_schema_dump
    produced a bad schema.rb that isn't valid ruby, it has an invalid
default, unless ruby
takes bare words:

   t.column "date_available", :datetime, :default => Sun Jan 01 00:00:00
Arabic Standard
Time 2006, :null => false

I don't think the Baghdad time zone should matter.

ruby 1.8.4, rails 1.1.2, MySQL 5.0.15, Win XP SP2

mysql> describe products;
+----------------+---------------+------+-----+---------------------+----------------+
| Field          | Type          | Null | Key | Default             | Extra          |
+----------------+---------------+------+-----+---------------------+----------------+
| id             | int(11)       | NO   | PRI | NULL                | auto_increment |
| title          | varchar(100)  | NO   |     |                     |                |
| description    | text          | NO   |     |                     |                |
| image_url      | varchar(200)  | NO   |     |                     |                |
| price          | decimal(10,2) | NO   |     | 0.00                |                |
| date_available | datetime      | NO   |     | 2006-01-01 00:00:00 |                |
+----------------+---------------+------+-----+---------------------+----------------+

Warren
E6dd9cedee99f9d02e5f87d80ee0e681?d=identicon&s=25 Warren Seltzer (Guest)
on 2006-04-27 10:40
(Received via mailing list)
It turns out this is ticket #4562 (defect).
http://dev.rubyonrails.org/ticket/4562

I'm just as frustrated, but now I feel validated too.  I'll take it as a
good enough
answer for now.

Warren Seltzer
This topic is locked and can not be replied to.