Can I run php artisan migrate:refresh
for specific table?
Or can I refresh specific table migration in general?
I tried this:
php artisan migrate --path=/database/migrations/selected/
But it's not working!
Can I run php artisan migrate:refresh
for specific table?
Or can I refresh specific table migration in general?
I tried this:
php artisan migrate --path=/database/migrations/selected/
But it's not working!
For Specific File run this command:
php artisan migrate:refresh --path="database\migrations\Your_Migration_File_Name_table.php"
Here --file=
is for location of your file and migrate:refresh
will empty your table data
If you want to empty all table's data from database then run
php artisan migrate:refresh
command.
This works for me:
The --table
and --create
options may also be used to indicate the name of the table and whether the migration will be creating a new table. These options pre-fill the generated migration stub file with the specified table
php artisan make:migration create_users_table --create=users
php artisan make:migration add_votes_to_users_table --table=user
© 2022 - 2024 — McMap. All rights reserved.