Merge lp:~therp-nl/openupgrade-server/openupgrade-server_migrate-script into lp:openupgrade-server/6.1
Status: | Merged |
---|---|
Merge reported by: | Holger Brunn (Therp) |
Merged at revision: | not available |
Proposed branch: | lp:~therp-nl/openupgrade-server/openupgrade-server_migrate-script |
Merge into: | lp:openupgrade-server/6.1 |
Diff against target: |
222 lines (+217/-0) 1 file modified
scripts/migrate.py (+217/-0) |
To merge this branch: | bzr merge lp:~therp-nl/openupgrade-server/openupgrade-server_migrate-script |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefan Rijnhart (Opener) | Approve | ||
Review via email: mp+134734@code.launchpad.net |
This proposal supersedes a proposal from 2012-11-16.
Description of the change
Usage: migrate.py [options]
Migrate script for the impatient or lazy. Makes a copy of your database,
downloads the files necessary to migrate it as requested and runs the
migration on the copy (so your original database will not be touched). While
the migration is running only errors are shown, for a detailed log see
${branch-
Options:
-h, --help show this help message and exit
-C CONFIG, --config=CONFIG
-D DATABASE, --database=DATABASE
-B BRANCH_DIR, --branch-
-R MIGRATIONS, --run-migration
-A ADD, --add=ADD load a python module that declares on dict
-I, --inplace don't copy database before attempting upgrade
Hi Holger,
Thank you, I can see this being useful. However, it seems a bit tailor made for Therp as it has the Banking Addons hardcoded in the script. Worse is that it does not allow for an arbitrary collection of addons branches.
Could you make it a little more generic so that an arbitrary number of branches may be downloaded and incorporated in the addons path? Such a construction may very well feature the Banking Addons as an example.
One more thing is the location of the script (the root path of the repository) which together with its name make it a little too prominent. It seems to imply that the script is tantamount to migrating any database. Please move it to the openupgrade directory, and change it to something like 'batch-migrate.py'.
Cheers,
Stefan.