Chatwoot/db/migrate/20191014051743_add_invited_by_to_user.rb
Lauren b89353b76c Feature/update confirmation email information (#145)
* Add `invited_by` foreign key to User

Allows for a User to be tied to the user who invited them

* Include `current_user` in new agent initialization parameters

* Add `shoulda-matchers` for testing associations

* Add Inviter information and associated account to welcome email

* Only show inviter info if applicable

* Update conversation spec for FFaker compatibility
2019-10-14 14:24:58 +05:30

5 lines
150 B
Ruby

class AddInvitedByToUser < ActiveRecord::Migration[6.1]
def change
add_reference(:users, :inviter, foreign_key: { to_table: :users })
end
end