Reputation: 1
how to make migration with specific table ? I've tried it with the command
php artisan module:make-migration alter_table_product_prices_add_supplier_price --table=product_prices Product
OR
php artisan module:make-migration alter_table_product_prices_add_supplier_price Product --table=product_prices
but it's does not work
and how to rollback migration with step on laravel modules ? I've tried it with the command
php artisan module:migrate-rollback --step=1 Product
OR
php artisan module:migrate-rollback Product --step=1
it's also does not work
Upvotes: 0
Views: 864
Reputation: 1
you need to write module like this --module=your_module.
php artisan module:make-migration add_group_commision_to_supplier_table --module=Supplier --table=suppliers
Upvotes: 0
Reputation: 559
if you have already created the table and you want to add/edit/delete a column
you can run this
php artisan make:migration add_column_name_to_product_prices_table
The important things to note there is
This is a screenshot of what I did, and the migration file that laravel created for me
Upvotes: 1