Skip to content

Commit 84d9075

Browse files
committed
add sql query
1 parent 4b2eac8 commit 84d9075

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

features/setting-up-your-instance/upgrading.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ In Core 1.1.4, we've made email addresses case insensitive, as this is a standar
1919

2020
All email addresses must be unique case-insensitively, meaning that a user with an address `[email protected]` can't coexist with another user with an address `[email protected]`. Before upgrading, make sure you don't have any users with the same email addresses given the above. If you do, please change those addresses or remove the users altogether. Remember to check it case-insensitively. If you have users with duplicate email addresses, the migrations will fail and you won't be able to upgrade.
2121

22+
You can use the following SQL query to locate users with duplicate emails in the database:
23+
24+
```sql
25+
select id, username, email from "user" where lower(email) in (
26+
select lower(email) from "user" group by lower(email) having count(*) > 1
27+
)
28+
```
29+
2230
## 1.0.0 -> 1.1.0
2331

2432
### Proxy

0 commit comments

Comments
 (0)