Sqitch

sqitch-init

Name

sqitch-init - Create a new Sqitch project

Synopsis

sqitch init <project>
sqitch init <project> --uri <uri>

Description

This command creates an new Sqitch project – basically a sqitch.conf file, a sqitch.plan file, and deploy, revert, and verify subdirectories.

Running sqitch init in an existing project is safe. It will not overwrite things that are already there.

Options

Configuration

The most important thing sqitch init does is create the project plan file, sqitch.conf. The options determine what gets written to the file:

As a general rule, you likely won’t need any of these options 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, core options 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.

Examples

Start a new Sqitch project named “quack” using the SQLite engine, setting the top directory for the project to sqlite:

sqitch init --engine sqlite --top-dir sqlite quack

Start a new Sqitch project named “bey” using the PostgreSQL engine, setting the top directory to postgres, script extension to ddl, reworked directory to reworked and a version-specific client:

sqitch init --engine  pg \
            --top-dir postgres \
            --client  /opt/pgsql-9.1/bin/psql \
            --extension ddl --dir reworked=reworked \
            bey

See Also

Sqitch

Part of the sqitch suite.