retrospring/db/migrate/20230128233136_add_pinned_at_to_answers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
206 B
Ruby
Raw Normal View History

2023-01-29 00:56:47 +01:00
# frozen_string_literal: true
class AddPinnedAtToAnswers < ActiveRecord::Migration[6.1]
def change
add_column :answers, :pinned_at, :timestamp
add_index :answers, %i[user_id pinned_at]
end
end