Complete the code to run all pending migrations in Rails.
rails db:[1]Use rails db:migrate to run all pending migrations and update the database schema.
Complete the code to rollback the last migration in Rails.
rails db:[1]The rails db:rollback command undoes the last migration, reverting the database schema by one step.
Fix the error in the command to rollback the last two migrations.
rails db:rollback [1]2
The correct option to specify how many migrations to rollback is STEP=. So the full command is rails db:rollback STEP=2.
Fill both blanks to create a command that resets the database and runs all migrations.
rails db:[1] db:[2]
The rails db:reset command drops and recreates the database, then rails db:migrate runs all migrations to set up the schema.
Fill all three blanks to rollback the last migration, reset the database, and then migrate again.
rails db:[1] db:[2] db:[3]
First, rails db:rollback undoes the last migration, then rails db:reset drops and recreates the database, and finally rails db:migrate runs all migrations again.