Thanks Jason. That would be helpful, except I read that post just the other day and already stole your rakefile! (thanks very much btw :)
I was thinking of a better way to add methods across several migrations, as the default_datetime will obviously be useful in several instances. Right now, I'm think of requiring a module and directly calling the module's class methods. Iain On 21 January 2012 16:02, Jason Dixon <[email protected]> wrote: > How I run my Sequel migrations: > > http://obfuscurity.com/2011/11/Sequel-Migrations-on-Heroku > > -J. > > On Sat, Jan 21, 2012 at 03:58:15PM +0000, Iain Barnett wrote: > > Hi, > > > > I was wondering if there's an alloted place/way for adding helpers to > > migrations? Obviously I can just add them in the normal Rubyish ways, but > > if there's something better (as a plugin, for example) then I'll use > that. > > > > Right now, it's to add in this in particular: > > > > > > > > def default_datetime > > if DB.database_type == :sqlite > > "(datetime('now','localtime'))".lit > > else > > Sequel::CURRENT_TIMESTAMP > > end > > end > > > > Any insight will be gratefully accepted. > > > > Regards, > > Iain > > > > -- > > You received this message because you are subscribed to the Google > Groups "sequel-talk" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]. > > For more options, visit this group at > http://groups.google.com/group/sequel-talk?hl=en. > > > > -- > Jason Dixon > DixonGroup Consulting > http://www.dixongroup.net/ > > -- > You received this message because you are subscribed to the Google Groups > "sequel-talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sequel-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
