Refactoring the code for pub sub (#155)
- We were using the attribute name 'channel' to store pubsub tokens, which was confusing. - switched to faker from ffaker - spec for contact.rb
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
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
|
||||
Reference in New Issue
Block a user