canvas-lms/db/migrate/20120215193327_accept_pendi...

13 lines
371 B
Ruby

class AcceptPendingGroupMemberships < ActiveRecord::Migration
tag :predeploy
def self.up
GroupMembership.where(:workflow_state => 'invited').update_all(:workflow_state => 'accepted')
GroupMembership.where(:workflow_state => 'requested').update_all(:workflow_state => 'accepted')
end
def self.down
raise ActiveRecord::IrreversibleMigration
end
end