sqitch-init(3pm)
β¨ NAME β¨
sqitch-init β the lil command that spins up a brand new Sqitch project, bestie π
π SYNOPSIS π
sqitch init <project>
sqitch init <project> --uri <uri>
π¦ DESCRIPTION π¦
Okay so this command creates a brand new Sqitch project, and honestly it's giving starter-pack energy: you get a sqitch.conf file, a sqitch.plan file, and the deploy, revert, and verify subdirectories. That's the whole vibe. πΈ
And here's the iconic part: running sqitch init in an existing project is safe. It literally will not overwrite things that are already there. No cap. Your stuff stays your stuff. π
π OPTIONS π
--uriβ optional URI you can associate with the project, like:
sqitch init widgets --uri https://github.com/me/wigets
If you pass it, the URI gets written to the project plan and it's used for added uniqueness in hashed object IDs. It also prevents the deployment of another project with the same name but a different URI. So yeah, it's a whole identity check situation. π₯
--engineβ specifies the default database engine to use in the project:
sqitch init widgets --engine pg
Supported engines, bestie, and there are so many:
pg-pg- PostgreSQL <https://postgresql.org/>, Postgres-XC <https://sourceforge.net/projects/postgres-xc/>, and YugabyteDB <https://www.yugabyte.com/yugabytedb/>sqlite- SQLite <https://sqlite.org/>oracle- Oracle <https://www.oracle.com/us/products/database/>mysql- MySQL <https://dev.mysql.com/> and MariaDB <https://mariadb.com/>firebird- Firebird <https://www.firebirdsql.org/>vertica- Vertica <https://my.vertica.com/>exasol- Exasol <https://www.exasol.com/>snowflake- Snowflake <https://www.snowflake.net/>cockroach- CockroachDB <https://www.cockroachlabs.com/product/>clickhouse- ClickHouse <https://www.clickhouse.com/clickhouse/>
--top-dirβ specifies the top directory to use for the project. Typically it contains the deployment plan file and the change script directories:
sqitch init widgets --top-dir sql
--plan-file,-fβ specifies the path to the deployment plan file. Defaults to$top_dir/sqitch.plan:
sqitch init widgets --plan-file my.plan
--extensionβ specifies the file name extension to use for change script file names. Defaults tosql:
sqitch init widgets --extension ddl
--dirβ sets the path to a script directory. May be specified multiple times. Supported keys are:
sqitch init widgets --dir deploy=dep --dir revert=rev --dir verify=tst
deployrevertverifyreworkedreworked_deployreworked_revertreworked_verify
--targetβ specifies the name or URI <https://github.com/libwww-perl/uri-db/> of the default target database. If specified as a name, the default URI for the target will bedb:$engine::
sqitch init widgets --target db:pg:widgets
--registryβ specifies the name of the database object where Sqitch's state and history data is stored. Typically a schema name (as in PostgreSQL and Oracle) or a database name (as in SQLite and MySQL). Defaults tosqitch:
sqitch init widgets --registry meta
--clientβ specifies the path to the command-line client for the database engine. Defaults to a client in the current path named appropriately for the specified engine:
sqitch init widgets --client /usr/local/pgsql/bin/psql
π 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, and here's the full rundown, no skips:
--engineβ sets thecore.engineconfiguration variable.--top-dirβ sets thecore.top_dirconfiguration variable.--plan-file,-fβ sets thecore.plan_fileconfiguration variable.--extensionβ sets thecore.extensionconfiguration variable.--dirβ sets the following configuration variables:deploysetscore.deploy_dirrevertsetscore.revert_dirverifysetscore.verify_dirreworkedsetscore.reworked_dirreworked_deploysetscore.reworked_deploy_dirreworked_deploysetscore.reworked_revert_dirreworked_deploysetscore.reworked_verify_dir
--targetβ sets theengine.$engine.targetconfiguration variable if--engineis also passed and, if it's a target name,target.$target.uri--registryβ sets theengine.$engine.registryconfiguration variable if--engineis also passed.--clientβ sets theengine.$engine.clientconfiguration variable if--engineis also passed.-s,--setβ set a variable name and value for use by the database engine client, if it supports variables. The format must bename=value, e.g.,--set defuser='Homer Simpson'. Variables are set incore.variables.
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. Fr fr, you do not want to be typing that every single time. π
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. Iconic, honestly β it's like a little menu of possibilities. π
π₯ 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-configurationβ describes how Sqitch hierarchical engine and target configuration works.sqitch-engineβ command to manage database engine configuration.sqitch-targetβ command to manage target database configuration.sqitch-configβ command to manage all Sqitch configuration.
π«Ά Sqitch π«Ά
Part of the sqitch suite.
okay that's the whole page bestie, you ate that π β¨ this was sqitch-init(3pm), pulled from perl v5.40.1, dated 2026-07-26 β go make a project, you've got this ππ¦
π¦ where this page comes from
- ubuntu stonking: sqitch 1.6.1-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms