Peace::DB - Database handler generator for the Peace shop.
my $peace = Peace->new;
my $home = $ENV{HOME};
my $config =
$peace->plugin(
JSONConfig => {
file => "$home/.config/peace/peace.conf"
}
);
my $dbh = Peace::DB->dbh( config => $config );
This module helps to recover a database handle and runs the migrations automatically when doing so.
Peace::DB implements the following functions:
Recovers a database handle, requires the config of the app as its parameter.
my $dbh = Peace::DB->dbh( config => $config );
Runs the migrations manually.
Peace::DB->run_migrations($dbh);