Ruby on Rails 8 · Generators

Generate a migration

Create a migration that adds a column. Rails reads the intent from the name.

bin/rails generate migration AddSlugToArticles slug:string

Official Ruby on Rails 8 documentation

More generators commands

All generators commands · Ruby on Rails 8 cheatsheet

Was this page helpful?