diff options
author | showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> | 2009-05-29 18:39:07 +0000 |
---|---|---|
committer | showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> | 2009-05-29 18:39:07 +0000 |
commit | ad02e91122ccc5fe29609096888a1d57847eac6b (patch) | |
tree | d5cf78bb9fe1b91ec5de873ffa16a5b7d7bdc0ef | |
parent | 420e107b671182bffcbe9a1bea1cb7b645a2a0eb (diff) |
add a debug mode to migrations. this is pretty handy for debugging complex migrations.
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@3180 592f7852-d20e-0410-864c-8624ca9c26a4
-rwxr-xr-x | database/migrate.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/database/migrate.py b/database/migrate.py index 396fc093..9a95d7c6 100755 --- a/database/migrate.py +++ b/database/migrate.py @@ -297,8 +297,11 @@ def main(): dest="action") parser.add_option("-f", "--force", help="don't ask for confirmation", action="store_true") + parser.add_option('--debug', help='print all DB queries', + action='store_true') (options, args) = parser.parse_args() database = database_connection.DatabaseConnection(options.database) + database.debug = options.debug database.reconnect_enabled = False database.connect() manager = MigrationManager(database, force=options.force) |