From: Thierry Parmentelat Date: Wed, 31 Jan 2007 10:03:17 +0000 (+0000) Subject: for executable migration scripts X-Git-Tag: pycurl-7_13_1~42 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=f9c9ed6519c34c8fe601a9f6c743f20a2e4c00bb for executable migration scripts --- diff --git a/migrations/README.txt b/migrations/README.txt index 86adddb..e8570bf 100644 --- a/migrations/README.txt +++ b/migrations/README.txt @@ -1,3 +1,8 @@ Store here migration scripts, named --up-any-text.sql +-up-any-text. with contiguous indices starting with 001 + +if the extension is .sql it is ran on the planetlab4 database +otherwise it is run as is + +See myplc/plc.d/db for how this is used diff --git a/setup.py b/setup.py index d83636f..5df2a9e 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: setup.py,v 1.7 2007/01/30 11:37:02 thierry Exp $ +# $Id: setup.py,v 1.8 2007/01/30 11:48:14 thierry Exp $ # from distutils.core import setup @@ -16,5 +16,5 @@ setup(py_modules = ['ModPython'], scripts = ['plcsh', 'Server.py', 'Test.py'], data_files = [('', ['planetlab4.sql']), ('php', ['php/plc_api.php']), - ('migrations', ['migrations/README.txt'] + glob('migrations/[0-9][0-9][0-9]*.sql')), + ('migrations', ['migrations/README.txt'] + glob('migrations/[0-9][0-9][0-9]*')), ])