migrate:init
fuel migrate:init

fuel migrate:init

Generate and run the initial database migrations for an existing project.

Usage

fuel migrate:init [options]

Description

Starts Docker, waits for PostgreSQL to become healthy, generates an initial TypeORM migration from the current schema, runs it, and optionally commits the migration files. This is useful when the initial migration step was skipped during fuel create:app.

Options

FlagDescriptionDefault
-p, --path <path>Path to the project root.current directory
--skip-commitSkip the git commit after migrations are generated and run.

Examples

Generate and run migrations in the current project

fuel migrate:init

Run migrations without committing

fuel migrate:init --skip-commit

Run migrations in a specific project

fuel migrate:init --path /path/to/project

Live Demo

Simulated terminal output for fuel migrate:init. Press replay to restart.

fuel migrate:init
$