canvas-lms/db/migrate/20130121212107_add_private_...

14 lines
443 B
Ruby

class AddPrivateHashToConversationParticipants < ActiveRecord::Migration
tag :predeploy
disable_ddl_transaction!
def self.up
add_column :conversation_participants, :private_hash, :string
add_index :conversation_participants, [:private_hash, :user_id], :where => "private_hash IS NOT NULL", :unique => true, :algorithm => :concurrently
end
def self.down
remove_column :conversation_participants, :private_hash
end
end