2019-11-27 07:12:00 +00:00
|
|
|
class RenameChannelAttributeNameInModels < ActiveRecord::Migration[6.0]
|
2019-10-16 21:48:07 +00:00
|
|
|
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
|
2019-10-16 21:48:07 +00:00
|
|
|
end
|
|
|
|
end
|