=pod

=head1 NAME

DBIx::Migration::CLI - Seamless database schema up- and downgrades CLI

=head1 VERSION

0.29

=head1 SYNOPSIS

=over

=item dbix-migration [ I<OPTIONS> ] I<dsn> [ I<directory> [ I<version> ] ]

=back

=head1 DESCRIPTION

This script prints the current migration version if invoked with the I<dsn>
argument only. The script applies the migrations up to the given target
I<version> if the I<direction> and I<version> arguments are specified too. If
the I<version> is missing the latest migration version will be used.

=head1 OPTIONS

=over

=item B<-V> Print version information and exit.

=item B<-h> Print long help message and exit.

=item B<-v> Print verbose information to stderr.

=item B<-u> I<username> Set database username.

=item B<-p> I<password> Set database password.

=item B<-s> I<schema> Set managed schema.

=item B<-t> I<schema> Set tracking schema.

=item B<-T> I<table> Set tracking table.

=back

=head1 ARGUMENTS

=over

=item I<dsn> Data source name.

=item I<directory> Directory that contains the migrations.

=item I<version> Version to migrate to. If not specified the latest migration will be taken.

=back

=head1 METHODS

=over

=item run()

Execute this script and return a proper C<exit()> argument value.

=back

=head1 EXAMPLES

  dbix-migration -t myapp_tracking -s myapp ':dbi:Pg:service=myservice' ~/Projects/myapp/db/migrations 2

initiates a migration to the target version 2. The tracking schema is
"myapp_tracking".  The managed schema is "myapp". The connection details are
configured in a I<~/.pg_service.conf> service file and extracted from there
using the service name "myservice".

=head1 SEE ALSO

L<DBIx::Migration>

=head1 AUTHOR

Sebastian Riedel, <kraihx@gmail.com>

=head1 CONTRIBUTORS

Sven Willenbuecher, <sven.willenbuecher@gmx.de>

=head1 COPYRIGHT

Copyright 2004-2005 Sebastian Riedel. All rights reserved.

This library is free software, you can redistribute it and/or modify it under
the same terms as Perl itself.

=cut
