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.
Usage:cleargenerate [flags...] [arg...]GeneratecodeautomaticallyFlags:--help# Displays help for the current command.--no-color# Cancel color output--verbose,-v# Display verbose informations during executionSubcommands:migration# Generate a new migrationmodel# Create a new model and the first migrationnew:kemal# Create a new project with Kemal
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.
Usage:clearmigrate [flags...] [arg...]ManagemigrationstateofyourdatabaseFlags:--help# Displays help for the current command.--no-color# Cancel color output--verbose,-v# Display verbose informations during executionSubcommands:down# Downgrade your database to a specific migration versionmigraterollback# Rollback the last up migrationseed# Call the seeds datasetstatus# Return the current state of the databaseup# Upgrade your database to a specific migration version