lift:migration
Last updated
Last updated
โ ๏ธ This is an experimental feature, keep that in mind when using it
The lift:migration
command allows you to generate a migration file based on your models. By default, it uses the App\Models
namespace, but you can change it using the --namespace
option.
All the created migration files will be placed inside the database/migrations
folder.
The command below will generate a migration file for the App\Models\User
model.
The command below will generate a migration file for the App\Models\Auth\User
model.
The command below will generate a migration file for the App\Custom\Models\User
model.
When the table for your model is not yet created in the database, the lift:migration
command will generate a migration file to create the table.
When the table for your model is already created in the database, the lift:migration
command will generate a migration file to update the table based on the differences between the model and the database table.