On Sun, Mar 15, 2009 at 7:17 AM, James Adam <[email protected]> wrote:
> > On Mar 15, 1:40 am, David Masover <[email protected]> wrote: > > At the risk of bikeshedding, I'd rather not have duplicate, > semi-generated > > code cluttering up that directory, and likely getting checked in to > version > > control. It was bad enough with sass... > > > > A compromise might be to use symlinks instead, but that's not portable. > > Unlike SASS, it's actually desirable that these files exist in version > control. But they already are, within the plugin. I'd invite you to look at http://interblah.net/plugin-migrations for a > more in-depth 'think-through' of why this is important, but do let me > know if you're still not convinced. Ah, I see your point. I am still not convinced that it needs to be duplicated -- I would still opt for a symlink, or maybe something like it: MigrateBarInPluginFoo = SomePluginModule.some_helper_method :Foo, :Bar Or, better: MigratePluginFooTo20081124174854 = some_helper_method :Foo, 20081224174854 If a plugin has multiple migrations when installed, no need for them each to have their own corresponding application migration. And version control should really be about tracking the user's own creations and changes -- and this is all the user did, they very likely didn't change anything about the content of the migration. Of course, probably the biggest reason this disagrees with me is that I don't really see that a plugin should conflict with existing tables. Ideally, the plugin should have namespaced models, for precisely this reason. I really have no idea, but I suspect this is how Merb Slices solves this problem. If there's really a potential problem of conflicting migrations, the extra column on schema_migrations would solve that, right? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
