Filed a ticket for bogus Ruby produced via: rake db_schema_dump http://dev.rubyonrails.org/ticket/3232 I'd appreciate it if someone could verify against PostgreSQL 8.0.x -- -- Tom M.
on 2005-12-15 09:34
on 2005-12-15 10:52
On 14-dec-2005, at 22:06, Tom M. wrote: > Filed a ticket for bogus Ruby produced via: > > rake db_schema_dump > > http://dev.rubyonrails.org/ticket/3232 This is expected behavior. If you want to set default values, the Rails way is to use a filter: class Model < ActiveRecord::Base protected before_create :set_default_values def.set_default_value self.updated_at = Time.now end end However, in the case of updated_at/on created_at/on, Rails will automagically populate those if present. -- Regards, Charles.
on 2005-12-15 11:38
What does this have to do with: rake db_schema_dump producing non-functional Ruby code that breaks tests and doesn't correctly instantiate the database? I find it rather hard to believe that broken code generation is expected behavior, or that the basis for the new DB migrations functionality is supposed to misassign default column value settings? -- -- Tom M.
on 2005-12-15 20:19
On 15-dec-2005, at 10:35, Tom M. wrote: > What does this have to do with: > > rake db_schema_dump Right. I missed that. -- Regards, Charles.