mirror of
https://github.com/discourse/discourse.git
synced 2024-12-22 21:46:08 +08:00
15 lines
315 B
Ruby
15 lines
315 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class AddEmailedStatusToInvite < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
add_column :invites, :emailed_status, :integer
|
||
|
add_index :invites, :emailed_status
|
||
|
|
||
|
DB.exec <<~SQL
|
||
|
UPDATE invites
|
||
|
SET emailed_status = 0
|
||
|
WHERE via_email = false
|
||
|
SQL
|
||
|
end
|
||
|
end
|