migrate-database-schema - Install, remove, upgrade, or downgrade a schema


    --dsn=DBI:string [--user=username] [--pass=password]
    [--desired-version=version|--info|--delete [--full]]
    [--dir=/path/to/schema/files] [--force-current-version=version]
    schema [schema [schema ... ]]


migrate-database-schema allows you to manage database schemas that have been installed by DBIx::Migration::Directories. Using this script, you can view information on your installed schemas, install new schemas, and upgrade/downgrade/remove existing schemas.


A list of database schema names is specified on the command line, along with some of the following options:


DBI's Data Source Name (DSN) to use when connecting to the database. Typical examples are 'DBI:mysql:database=test' or 'DBI:SQLite2:/my/database/file'.

This option is required, unless the DBI_DSN environment variable is set (See DBI).


Username to connect to the database with, if required by your database.


Password to connect to the database with, if required by your database.


Display information about the schemas. If no schema names are specified on the commandline, information about all currently installed schemas is returned.


Delete the specified schemas.


When deleting specified schemas, also delete the DBIx-Migration-Directories schema if no other schemas are using it.


Instead of attempting to upgrade to the latest version, upgrade (or downgrade) us to the specified version.


Ignore what the database says, assume the current schema version is number. This is mostly useful with MySQL databases, since they are incapable of rolling back DDL changes if a migration fails. If this happens in MySQL and you need to "roll back", make sure you have a well-written backwards migration (eg; "DROP TABLE IF EXISTS" instead of "DROP TABLE") and use the arguments, "--force-current-version=[new.version] --desired-version=[old.version]"


Explain our actions as we take them.


Display usage synopsis and exit.


DBIx::Migration::Directories, DBI