Conn2Flow
Docs navigation

Reference / CLI

CLI: Database

c2f db commands, arguments and options declared in source code.

The db:* family has 3 command(s) registered in Application.php.

Run php cli/c2f.php <command> --help at the Core root to check the installed version. The console uses its own contracts; --help is handled before execute(). The syntax below comes from each command.

db:check-migrations

Source: cli/src/Commands/DbCheckMigrationsCommand.php.

Usage: c2f db:check-migrations [projectID] [--dir=<migrations folder>]
Without a project, checks the core (and its plugins). With a project from environment.json, also checks its migrations and plugins. --dir adds another folder. Exit code 1 when a duplicate is found.

Reports duplicated migration versions or classes across core, plugins and project (req-197). On the server all of them land in the same db/migrations, and Phinx refuses every run when two collide. The same file in two sources (the core copy in the project mirror) is not a clash. Runs automatically as the first check of project:update-all and works as a pre-commit check.

db:test

Source: cli/src/Commands/DbTestCommand.php.

Usage: c2f db:test [--filter=TestName]
Runs PHPUnit tests configured in phpunit.xml.

db:update

Source: cli/src/Commands/DbUpdateCommand.php.

Usage: c2f db:update
Synchronizes data schemas and seeds into the local database.

The Future is Hybrid: Human + AI.

Conn2Flow is the tool. If you need the Architect to design your company's strategy using this technology...

Hire Specialized Consulting