discourse/db/migrate/20210105165605_add_processe...

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

15 lines
418 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddProcessedToNotifications < ActiveRecord::Migration[6.0]
def up
add_column :notifications, :processed, :boolean, default: false
execute "UPDATE notifications SET processed = true"
change_column_null(:notifications, :processed, false)
add_index :notifications, [:processed], unique: false
end
def down
remove_column :notifications, :processed
end
end