Diary of problems and solutions related to web programming, database development and related technologies and platforms.

Easiest way of adding columns to migration table

Easiest way to add columns to the migration table is to run migration from command mode. For example:

If two columns let's say: image (string) and email (string) are to be added to staffs table, then run the statements like this in command mode.

rails g migration add_columns_to_staffs image:string email:string

No comments :

Post a Comment