Chatwoot/db/migrate/20191016211109_rename_channel_attribute_name_in_models.rb

10 lines
307 B
Ruby
Raw Normal View History

class RenameChannelAttributeNameInModels < ActiveRecord::Migration[6.0]
def change
rename_column :users, :channel, :pubsub_token
rename_column :contacts, :chat_channel, :pubsub_token
2019-10-20 08:47:26 +00:00
add_index :users, :pubsub_token, unique: true
add_index :contacts, :pubsub_token, unique: true
end
end