On Sun, Feb 15, 2009 at 7:33 PM, cult hero <[email protected]> wrote: > > I found this on Sequel's mailing list: > > Sequel::MySQL.default_engine = 'InnoDB' > > Where and how can I use this from within Merb? I'd prefer not to have > to put it in each and every one of my create table migrations and it's > also an option I'd like ignored when using, say, Postgres (I'm trying > to make this app DB agnostic).
Plenty of places. You could put it in the init.rb near the Merb::Config settings, or in the environment-specific config files, or in the dependencies.rb file as a block passed to Sequel's dependency statement. (The latest Merb app boilerplate includes an example of this for Merb::Cache.) Really, anyplace before you start creating tables would be a good place. Or you could do it in the OS as part of your MySQL configuration instead. It seems a little bit off to me that you say you want the app to be database agnostic on the one hand, but on the other hand you want to dictate whether another user of your app runs MyISAM or InnoDB. Is that really agnostic? Does your app's functionality depend on InnoDB's features? -- Have Fun, Steve Eley ([email protected]) ESCAPE POD - The Science Fiction Podcast Magazine http://www.escapepod.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
