Rails migration: how to retrieve current migration version?

There’s a much nicer way: rails db:migrate:status

up     20120530222941  Create shenanigans
up     20120613030015  *** NO FILE ***

Indicating that I’ve deleted my latest migration file.

Or more simply:

> rails db:version
Current version: 20120613030015

NOTE: for Rails versions prior to 5.0 replace rails with rake.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)