Convos::Upgrader - Apply changes from one convos version to another
This class can to upgrade the convos database from one version to another.
Before running the upgrade, we try to do a backup of the current redis data related to convos. If that fail, we do not continue.
The upgrade is done by fetching the current version that is stored in the database and run the steps from the version after and up to the lastest version available. Each step is described in the Convos::Upgrader namespace.
It is possible to set the environment variable "CONVOS_FORCE_UPGRADE" if you want to skip the backup step.
Convos::Upgrader::v0_3003
Convos::Upgrader::v0_3004
Convos::Upgrader::v0_3005
Holds a list of Convos::Upgrader::v_xxx objects that will be used to upgrade Convos. This attribute is initialized by "running_latest".
Convos::Upgrader::v_xxx
Holds a Mojo::Redis object. Required in constructor to avoid migrating the wrong database.
Holds the current version. This attribute is initialized by "running_latest".
$self->run(sub { my($self, $err) = @_; });
This method will check the current database version and run upgrade steps to the wanted version. $err will be false if everything went well.
$err
$self = $self->running_latest(sub { my($self, $bool) = @_; });
Check if the latest version of the Convos database is in effect.
Jan Henning Thorsen - jhthorsen@cpan.org
jhthorsen@cpan.org
To install Convos, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Convos
CPAN shell
perl -MCPAN -e shell install Convos
For more information on module installation, please visit the detailed CPAN module installation guide.