bigbluebutton / greenlight

A really simple end-user interface for your BigBlueButton server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix mails with uppercase letters

Lukas-Rotermund opened this issue · comments

Hello,

in the patchnotes for release-3.0.9 it says there is a migration task to fix the mails in the db to be lowercase.
The task runs aotomatically on update.
Is it possible to run this task seperately without updating greenlight-v3?

You can run these commands

docker exec -it greenlight-v3 rails c

and then paste this code in the console

User.all.find_each(batch_size: 250) do |user|
  downcase = user.email.downcase
  next if user.email == downcase

  user.update(email: downcase)
end