Check the migration status of rails

Check migration

What version of migration is available now ...? I don't know. When

$ rake db:migrate:status

 Status   Migration ID    Migration Name
--------------------------------------------------
   up     20200530221315  Create staff members
   up     20200531020945  Create administrators
   up     20200603224605  Create staff events
  down    20200606215347  Create customers
  down    20200606215411  Create addresses

You can check it with rake db: migrate: status. If there is a version in the table, it is down if it is not up. It was easy to confirm.

By the way, when you want to perform only the specified version of migration

$ bin/rails db:migrate VERSION=20200606215411
Migrate to the specified version

I was able to check the version like this and migrate the specified version. Congratulations

** 82 days to become a full-fledged engineer **

Recommended Posts

Check the migration status of rails
[Rails] Check the contents of the object
[Rails] Delete the migration file
Check the rate limit application status of docker pull
Rails migration
Check the version of Cent OS
Explanation of the order of rails routes
Command to check the number and status of Java threads
Check the status of Java application without using monitoring tool
Check the root on the Rails browser
Check the contents of the Java certificate store
Check the contents of params with pry
The identity of params [: id] in rails
Memo: [Java] Check the contents of the directory
part of the syntax of ruby ​​on rails
[Rails] Change the label name of f.label
Check the processing contents with [rails] binding.pry
The process of introducing Vuetify to Rails
Check the version of the standard Web software.
[Java] Check the number of occurrences of characters
Check the operation of the interface through threads
[Rails] Check the instance variables and local variables of the file you are browsing
[Order method] Set the order of data in Rails
[Rails] Button to return to the top of the page
[Ruby on Rails] Until the introduction of RSpec
Let's check the feel of Spring Boot + Swagger 2.0
Read the Rails Guide (Active Record Migration) again
How to check Rails commands in the terminal
[Ruby on Rails] Rails tutorial Chapter 14 Summary of how to implement the status feed
UCP-45060 The life cycle state is invalid. Check the status of the universal connection pool
A review of the code used by rails beginners
The world of clara-rules (2)
One case of solving a migration error in Rails
[Rails] Migration command summary
Check the capacity of the Linux server. (Df command, du command)
Docker the development environment of Ruby on Rails project
Various rails migration operations
Judgment of the calendar
I summarized the display format of the JSON response of Rails
The world of clara-rules (1)
Check the behavior of Java Intrinsic Locks with bpftrace
[Rails] How to change the column name of the table
The world of clara-rules (3)
Rails Tutorial/Significance of Indexing
[Rails] Cancel / change the default password validation of devise
Read the Rails Guide (Overview of Action Controller) again
Rails6: Input the initial data of ActionText using seed
The world of clara-rules (5)
The idea of quicksort
Understand migration in rails
[Rails] How to get the contents of strong parameters
Check the result of generic parameter inference with JShell
SSL in the local environment of Docker / Rails / puma
Roughly the flow of web application development with Rails.
Check the behavior of include, exclude, ExhaustedRetryException of Spring Retry
[Rails] Let's dynamically get the threshold of model validation "length check" from table information
I can't get out of the Rails dbconsole screen
Master the [Rails] scope!
Try using the query attribute of Ruby on Rails
The idea of jQuery
[Rails] Put the same restrictions on multiple pieces of information