2311efd03e
Previously if someone started signing in on their phone, but finished it on their laptop, they'd end up on the menu screen with no account. Bu tracking the purpose of a Magic Link we can always direct the user to sign up if they requested a magic link through sign up. This also makes the logic for changing the copy in the email more robust.
12 lines
266 B
Ruby
12 lines
266 B
Ruby
class AddPurposeToMagicLinks < ActiveRecord::Migration[8.2]
|
|
def change
|
|
add_column :magic_links, :purpose, :integer, null: true
|
|
|
|
execute <<-SQL
|
|
UPDATE magic_links SET purpose = 0
|
|
SQL
|
|
|
|
change_column_null :magic_links, :purpose, false
|
|
end
|
|
end
|