Files
ubicloud/migrate/20240918_make_invitation_email_citex.rb
Enes Cakir c427e67871 Make project invitation emails case insensitive
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)
2024-09-18 15:42:03 +03:00

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