class AddStatusToEntries < ActiveRecord::Migration[8.1]
  def change
    add_column :entries, :status, :integer, default: 2, null: false
    add_index :entries, :status

    # Set all existing entries to status: 2 (active)
    reversible do |dir|
      dir.up do
        execute "UPDATE entries SET status = 2"
      end
    end
  end
end
