Aug 22, 2017 · 1 min read
One other tip that can help from time to time:
rails generate migration AddDeletedAtToClients deleted_at:datetime:indexthat generates the migration to add the deleted_at column and define an index on this column:
class AddDeletedAtToClients < ActiveRecord::Migration
def change
add_column :clients, :deleted_at, :datetime
add_index :clients, :deleted_at
end
end