diff options
author | Russ Allbery <rra@stanford.edu> | 2011-05-17 16:11:06 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2011-05-17 16:11:06 -0700 |
commit | 4ee50d93cf99f55a503d0ca788e6c1a468eeacf6 (patch) | |
tree | d03149c8148c682337f791b45b76226ed613f04f /server | |
parent | deaa5c140e85d8e1248d910f0721c9e00a46e439 (diff) |
Add wallet-admin upgrade command to upgrade the database
Hook the new upgrade method of Wallet::Schema into Wallet::Admin
and the wallet-admin wrapper script.
Diffstat (limited to 'server')
-rwxr-xr-x | server/wallet-admin | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/wallet-admin b/server/wallet-admin index f81c195..fbab72b 100755 --- a/server/wallet-admin +++ b/server/wallet-admin @@ -3,7 +3,8 @@ # wallet-admin -- Wallet server administrative commands. # # Written by Russ Allbery <rra@stanford.edu> -# Copyright 2008, 2009, 2010 Board of Trustees, Leland Stanford Jr. University +# Copyright 2008, 2009, 2010, 2011 +# The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -56,6 +57,9 @@ sub command { } else { die "only object or verifier is supported for register\n"; } + } elsif ($command eq 'upgrade') { + die "too many arguments to upgrade\n" if @args; + $admin->upgrade or die $admin->error, "\n"; } else { die "unknown command $command\n"; } @@ -133,6 +137,11 @@ default as part of database initialization, so this command is used primarily to register local implementations of additional object types or ACL schemes. +=item upgrade + +Upgrades the database to the latest schema version, preserving data as +much as possible. + =back =head1 SEE ALSO |