I''ve defined a table with these columns t.column "some_date", :date, :null => false t.column "some_time", :time, :null => false The result in schema.rb is t.column "some_date", :date, :null => false t.column "some_time", :time, :default => Sat Jan 01 00:00:00 GMT Standard Time 2000, :null => false The time column generates a default I didn''t ask for. The default value given is not quoted and fails. -- Posted via http://www.ruby-forum.com/.
This problem prevented me from using migrations. http://dev.rubyonrails.org/ticket/3232 Since the app I''m writing is Rails only, I decided to drop the default on the column, let Rails handle it, and learn about migrations. Migrations rock. :-) -- -- Tom Mornini On Jan 21, 2006, at 10:19 AM, Garz wrote:> > I''ve defined a table with these columns > t.column "some_date", :date, :null => false > t.column "some_time", :time, :null => false > > The result in schema.rb is > t.column "some_date", :date, :null => false > t.column "some_time", :time, :default => Sat Jan 01 00:00:00 GMT > Standard Time 2000, :null => false > > The time column generates a default I didn''t ask for. The default > value > given is not quoted and fails. > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Is there any plans on fixing this bug? I have a rails application that will be using data in a lagacy db, and adding new tables. I would like to use migration to deal with the schema changes from the lagacy schema. My problem is that this bug makes migrations totally useless for this project. On Sat, 21 Jan 2006, Tom Mornini wrote:> This problem prevented me from using migrations. > > http://dev.rubyonrails.org/ticket/3232 > > Since the app I''m writing is Rails only, I decided > to drop the default on the column, let Rails handle > it, and learn about migrations. > > Migrations rock. :-) > > -- -- Tom Mornini > > On Jan 21, 2006, at 10:19 AM, Garz wrote: > >> >> I''ve defined a table with these columns >> t.column "some_date", :date, :null => false >> t.column "some_time", :time, :null => false >> >> The result in schema.rb is >> t.column "some_date", :date, :null => false >> t.column "some_time", :time, :default => Sat Jan 01 00:00:00 GMT >> Standard Time 2000, :null => false >> >> The time column generates a default I didn''t ask for. The default value >> given is not quoted and fails. >> >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Ken I don''t know the status of this bug, but afaik you could still use direct sql calls from migrations as a workaround (never done that though, just a hint!). cheers Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 27/01/06, Ken Bowley <rails@trod.org> wrote:> > Is there any plans on fixing this bug? I have a rails application that > will be using data in a lagacy db, and adding new tables. I would like to > use migration to deal with the schema changes from the lagacy schema. My > problem is that this bug makes migrations totally useless for this > project. >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060127/c0066ed7/attachment.html
The problem is with the schema.rb file. When it pulls the schema from the database, it writes seriously broken ruby code to the schema.rb file causing everything to break. On Fri, 27 Jan 2006, Thibaut Barr?re wrote:> Hi Ken > > I don''t know the status of this bug, but afaik you could still use direct > sql calls from migrations as a workaround (never done that though, just a > hint!). > > cheers > > Thibaut > -- > [blog] http://www.dotnetguru2.org/tbarrere > > On 27/01/06, Ken Bowley <rails@trod.org> wrote: >> >> Is there any plans on fixing this bug? I have a rails application that >> will be using data in a lagacy db, and adding new tables. I would like to >> use migration to deal with the schema changes from the lagacy schema. My >> problem is that this bug makes migrations totally useless for this >> project. >> >