2
0

first commit

This commit is contained in:
2024-08-09 00:39:27 +02:00
commit 79688abe2e
5698 changed files with 497838 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
-- Find users with uppercase characters in email
SELECT * FROM users u WHERE u.email ~ '[[:upper:]]';
-- Find emails with case insensitive duplicates
SELECT lower(email) FROM users GROUP BY lower(email) HAVING count(*) > 1;
-- List emails with their case insensitive duplicates
SELECT * FROM users u WHERE LOWER(u.email) IN (
SELECT lower(email) FROM users GROUP BY lower(email) HAVING count(*) > 1
);
-- Lowercase all user emails (This will fail if there are case insensitive duplicates)
UPDATE users SET email = lower(email) WHERE email ~ '[[:upper:]]';