I have a rake task that won’t work unless a table exists. I’m working with more than 20 engineers on a website so I want to make sure they have migrated the table before they can do a rake task which will populate that respective table.
Does AR have a method such as Table.exists? How can I make sure they have migrated the table successfully?
In Rails 5 the API became explicit regarding tables/views, collectively data sources.
In Rails 2, 3 & 4 the API is about tables.
Getting the status of migrations:
If you need more APIs for migrations or metadata see:
this is the
ActiveRecord::Baseclass for theschema_migrationstablewhere all the action happens when migrations are run