Suppose I created a table table in a Rails app. Some time later, I add a column running:
table
rails generate migration AddUser_idColumnToTable user_i
You can use this, just think Job is the name of the model to which you are adding index cader_id:
class AddCaderIdToJob < ActiveRecord::Migration[5.2] def change change_table :jobs do |t| t.integer :cader_id t.index :cader_id end end end