Previously Mike Orr wrote: > > On Fri, Feb 22, 2008 at 11:06 AM, Brian Granger <[EMAIL PROTECTED]> wrote: > > We have two pylons apps that we want to combine using a composite > > app. One of our pylons apps has a database that needs to be setup > > using the standard 'paster setup-app' command. > > I have doubts about whether setup-app is really worthwhile. An > alternative is to make a scripts/ package in your application and run > them with "python -m". Or you can get fancy and set up entry points > to make them normal executables.
at this moment it still appears to be the documented way to do application setup, so either there should be a new documented best practice or this should be fixed. I just ran into the same problem (although it appears to break differently now) so I'ld expect this to be a fairly common issue. > The problem with setup-app is it can only do one thing, and that thing > may be wrong when copying an existing deployment or updating it. For > instance, you may have to create the database tables, or reset the > data to an initial state, or add a column or modify its type without > disturbing existing data. Or you may have to reinitialize some tables > but not others, or set up some data files, etc. if setup-app took > arguments it could handle all these cases, but it doesn't. I get the imporession that you are talking about migration types of usage here. That is a very different problem than initial application setup and is indeed best served differently, most likely in a way that is much closer tied to the specific application. Initial setup is simple and predictable in most cases: create a database, create some tables, load some initial data, maybe create a file and directory or two. websetup/paster setup-app seems to be a good standard way to do that. Perhaps it can be extended with a flag to make it refuse to run if it has been run before, which will prevent people from accidentily zapping existing data. Wichert. -- Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---