Migrations
Learn about Rails migrations
We'll cover the following
What are migrations?
Migrations are a convenient way for you to alter your database in a structured and organized manner. They are a subclass of the ActiveRecord::Migration
class.
The Migration
class in Active Record contains helper methods that perform CRUD operations in a database-independent way. These helper methods include:
- add/remove/_column
- add/remove_index
- change/rename_column
- create/change/drop_table
These are the types of things we want our model class to be able to perform.
Get hands-on with 1400+ tech skills courses.