Chatwoot/db/migrate/20191016211109_rename_channel_attribute_name_in_models.rb
2019-10-20 14:17:26 +05:30

9 lines
307 B
Ruby

class RenameChannelAttributeNameInModels < ActiveRecord::Migration[6.1]
def change
rename_column :users, :channel, :pubsub_token
rename_column :contacts, :chat_channel, :pubsub_token
add_index :users, :pubsub_token, unique: true
add_index :contacts, :pubsub_token, unique: true
end
end