NAME
App::Schema::Deploy - Base class for schema-deploy script.
SYNOPSIS
use App::Schema::Deploy;
my $app = App::Schema::Deploy->new;
my $exit_code = $app->run;
METHODS
new
my $app = App::Schema::Deploy->new;
Constructor.
Returns instance of object.
run
my $exit_code = $app->run;
Run.
Returns 1 for error, 0 for success.
ERRORS
run():
Cannot connect to database.
Error: %s
Cannot deploy schema.
Error: %s
Cannot load Schema module.
Module name: %s
Error: %s
Instance of schema must be a 'DBIx::Class::Schema' object.
Reference: %s
EXAMPLE
use strict;
use warnings;
use App::Schema::Deploy;
# Arguments.
@ARGV = (
'dbi:SQLite:dbname=sqlite.db',
'Schema::Commons::Vote',
);
# Run.
exit App::Schema::Deploy->new->run;
# Output like:
# Schema (v0.1.0) from 'Schema::Commons::Vote' was deployed to 'dbi:SQLite:dbname=sqlite.db'.
DEPENDENCIES
English, Error::Pure, Getopt::Std.
SEE ALSO
- Schema::Abstract
-
Abstract class for DB schemas.
- App::Schema::Data
-
Base class for schema-data script.
REPOSITORY
https://github.com/michal-josef-spacek/App-Schema-Deploy
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2022-2024 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.05