sqitch-init - Create a new Sqitch project
sqitch [options] init project sqitch [options] init --uri uri project
This command creates an new Sqitch project -- basically a sqitch.conf file, a sqitch.plan file, and a sql directory with deploy, revert, and verify subdirectories.
Running sqitch init in an existing project is safe. It will not overwrite things that are already there.
--uri
Optional URI to associate with the project. If present, the URI will be written to the project plan and used for added uniqueness in hashed object IDs.
The most important thing sqitch init does is create the project plan file, sqitch.conf. While the init command has no options of its own, it relies on several of the options to sqitch to determine what to write to this file:
sqitch init
init
sqitch
--plan-file
Sets the core.plan_file configuration variable.
core.plan_file
--top-dir
Determines the top-level directory to use when writing the plan and thecore.deploy_dir, core.revert_dir, and core.verify_dir variables -- unless they are overridden by their more-specific options, detailed below.
core.deploy_dir
core.revert_dir
core.verify_dir
--deploy-dir
Sets the core.deploy_dir configuration variable.
--revert-dir
Sets the core.revert_dir configuration variable.
--verify-dir
Sets the core.verify_dir configuration variable.
--extension
Sets the core.extension configuration variable.
core.extension
--engine
Sets the core.engine configuration variable.
core.engine
--client
Sets the engine.$engine.client configuration variable if --engine is also passed.
engine.$engine.client
--registry
Sets the engine.$engine.registry configuration variable if --engine is also passed.
engine.$engine.registry
As a general rule, you likely won't need any of them except for --engine, since many commands need to know what engine to use, and specifying it on the command-line forever after would be annoying.
These variables will only be written if their corresponding options are specified. Otherwise, they get written as comments with user or system configuration settings, or, failing any values from those locations, from their default values. If no defaults are specified, they will still be written, commented out, with a bar = and no value. This allows one to know what sorts of things are available to edit.
=
Start a new Sqitch project using the SQLite engine, setting the top directory for the project to sqlite:
sqitch --engine sqlite --top-dir sqlite init
Start a new Sqitch project using the PostgreSQL engine, setting the top directory to postgres, a script extension of ddl, and a version-specific client:
ddl
sqitch --engine pg \ --top-dir postgres \ --extension ddl \ --client /opt/pgsql-9.1/bin/psql init
Part of the sqitch suite.
To install App::Sqitch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Sqitch
CPAN shell
perl -MCPAN -e shell install App::Sqitch
For more information on module installation, please visit the detailed CPAN module installation guide.