Clear ORM
Search…
Migration CLI

Available Commands

There are a few commands that makes it a more enjoyable experience to your everyday usage of Clear ORM.

Generators

The model and scaffold generators will create migrations appropriate for adding a new model. Clear ORM provides a consice DSL for defining migrations, but these can also be generated via the CLI.
1
Usage:
2
clear generate [flags...] [arg...]
3
4
Generate code automatically
5
6
Flags:
7
--help # Displays help for the current command.
8
--no-color # Cancel color output
9
--verbose, -v # Display verbose informations during execution
10
11
Subcommands:
12
migration # Generate a new migration
13
model # Create a new model and the first migration
14
new:kemal # Create a new project with Kemal
Copied!

Migration

Migrations are a convenient way to alter the database schema over time in a consistent and easy way. Clear ORM provides a beautiful DSL so that you don't have to write SQL by hand, allowing your schema and changes to be database independent.
1
Usage:
2
clear migrate [flags...] [arg...]
3
4
Manage migration state of your database
5
6
Flags:
7
--help # Displays help for the current command.
8
--no-color # Cancel color output
9
--verbose, -v # Display verbose informations during execution
10
11
Subcommands:
12
down # Downgrade your database to a specific migration version
13
migrate
14
rollback # Rollback the last up migration
15
seed # Call the seeds data
16
set
17
status # Return the current state of the database
18
up # Upgrade your database to a specific migration version
Copied!
Last modified 1yr ago