When a user registers using an invitation email with different casing,
the system fails to find the invitation because the email column is
case-sensitive. I reviewed the rodauth code and found that it uses a
`citext` column for emails to ensure case insensitivity [^1]. Given that
we match `accounts.email` with `project_invitation.email`, we also need
to make `project_invitations.email` case-insensitive.
[^1]: 24bc83ff54/README.rdoc (L317)
16 lines
256 B
Ruby
16 lines
256 B
Ruby
# frozen_string_literal: true
|
|
|
|
Sequel.migration do
|
|
up do
|
|
alter_table(:project_invitation) do
|
|
set_column_type :email, :citext
|
|
end
|
|
end
|
|
|
|
down do
|
|
alter_table(:project_invitation) do
|
|
set_column_type :email, :text
|
|
end
|
|
end
|
|
end
|