Chatwoot/db/migrate/20191016211109_rename_channel_attribute_name_in_models.rb
2019-11-27 12:42:00 +05:30

9 lines
307 B
Ruby

class RenameChannelAttributeNameInModels < ActiveRecord::Migration[6.0]
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