Database
The database command (db) contains database operation commands. Things like migrate, create your database live under the database command, the command allows you to do operations with your database.
#
SubcommandsThe Database command does not take any action when invoked directly, however, it contains a set of subcommands that can be used to perform database operations which we will describe in detail below.
#
CreateCreates a database on the specified connection, defaults to use the development
connection. Some examples for its usage are:
$ ox db create$ ox db create --conn=development
#
MigrateRuns migrations on the specified direction and connection, defaults to use the development
connection and the up
direction. Some examples for its usage:
$ ox db migrate$ ox db migrate up$ ox db migrate down --conn development
#
ResetReset drops and recreates the database on the specified connection, defaults to use the development
connection. Some examples for its usage:
$ ox db reset$ ox db reset conn development