Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to run all pending migrations in Laravel.
Laravel
php artisan [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'rollback' instead of 'migrate' to run migrations.
Confusing 'migrate:reset' with running migrations.
✗ Incorrect
Use php artisan migrate to run all pending migrations.
2fill in blank
mediumComplete the code to rollback the last batch of migrations.
Laravel
php artisan [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'migrate' instead of 'migrate:rollback' to undo migrations.
Confusing 'migrate:reset' with rollback.
✗ Incorrect
Use php artisan migrate:rollback to undo the last batch of migrations.
3fill in blank
hardFix the error in the command to rollback all migrations.
Laravel
php artisan [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to use '--all' option with rollback command.
Using 'migrate:refresh' instead of 'migrate:reset' to rollback all.
✗ Incorrect
Use php artisan migrate:reset to rollback all migrations.
4fill in blank
hardFill both blanks to refresh the database by rolling back and re-running all migrations.
Laravel
php artisan [1] [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'migrate:reset' with '--seed' which is invalid.
Confusing '--force' with '--seed'.
✗ Incorrect
migrate:refresh rolls back and re-runs all migrations. Adding --seed runs the database seeders after refreshing.
5fill in blank
hardFill all three blanks to rollback the last two batches of migrations with force.
Laravel
php artisan [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'migrate:reset' instead of rollback for partial rollback.
Omitting '--force' when running in production.
✗ Incorrect
Use migrate:rollback --step=2 --force to rollback the last two batches without confirmation prompts.