Maurice
bb5cc8f795
fix(db): one account per email address, whatever its case
...
Login, password reset and the sign-up checks all match emails
case-insensitively, but the only constraint was the column's own
UNIQUE, which SQLite compares case-sensitively. Two accounts whose
addresses differ only in case (legacy rows, two sign-ups at once) left a
login to resolve to whichever row came first, and LOWER(email) lookups
had no index to use.
A migration adds a unique index on lower(email). An install that
already holds such a pair must still start, so the migration then
leaves the index out, logs how many addresses are shared and by which
user ids (not the addresses), and records email_case_index_pending.
Since a migration runs once, db/email-case-index.ts runs on every boot
while that flag is set: it repeats the warning until the accounts are
told apart, then creates the index and clears the flag. The app-level
checks keep guarding meanwhile.
A write that passes the up-front check and still loses the race is now
refused by the database. The users repository turns that unique
violation into UserIdentityTakenError, and sign-up, admin create and
edit, and the profile update answer it with the same 409 their checks
give, instead of a 500 or an unhandled rejection (ADMIN-SVC-094 pinned
the old behaviour and now pins the 409).
The entity generator could not see an expression index (PRAGMA
index_info names its column NULL), so PARITY-009c found a db index with
no entity declaration. Rule 14 carries such an index into the entity as
a named entry with its own statement; Users.entity.ts is regenerated.
2026-10-08 13:02:58 +02:00
..
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-07 19:58:12 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-27 23:26:42 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:02:58 +02:00
2026-10-07 16:05:02 +02:00
2026-06-16 22:22:45 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:16:26 +02:00
2026-07-25 15:12:38 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 22:43:09 +02:00
2026-08-17 14:48:23 +02:00
2026-09-15 21:36:34 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-07-27 22:34:41 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-07 15:14:14 +02:00
2026-10-08 13:02:58 +02:00
2026-08-22 11:33:55 +02:00
2026-10-07 16:03:19 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 17:12:26 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:05:02 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 22:56:35 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-12 14:14:37 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:47:53 +02:00
2026-09-19 21:01:45 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-25 19:26:38 +02:00
2026-06-16 22:22:45 +02:00
2026-09-01 17:18:10 +02:00
2026-10-07 17:12:26 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-14 23:00:57 +02:00
2026-10-06 19:27:30 +02:00
2026-09-14 23:00:57 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-08-07 18:42:53 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-22 11:33:55 +02:00
2026-08-11 16:42:49 +02:00
2026-10-07 16:40:40 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-16 11:08:07 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-01 17:18:10 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-20 15:43:27 +02:00
2026-10-06 19:27:30 +02:00
2026-09-03 10:47:08 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-15 16:42:27 +02:00
2026-08-15 16:42:27 +02:00
2026-09-12 18:02:57 +02:00
2026-08-15 16:42:27 +02:00
2026-08-15 16:42:27 +02:00
2026-09-07 18:36:54 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-07 18:36:54 +02:00
2026-10-06 19:27:30 +02:00
2026-09-07 14:05:33 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-07 18:36:54 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-26 11:22:20 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:02:57 +02:00
2026-09-04 12:15:53 +02:00
2026-09-04 12:15:53 +02:00
2026-10-07 16:45:21 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 17:55:25 +02:00
2026-08-15 16:42:27 +02:00
2026-09-22 13:30:12 +02:00
2026-10-07 16:05:02 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:05:02 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-10 17:08:54 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-10 12:24:15 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-07-30 17:07:12 +02:00
2026-08-12 17:43:22 +02:00
2026-10-06 22:43:09 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-08-23 11:59:12 +02:00
2026-10-07 22:40:12 +00:00
2026-08-10 19:54:46 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-08 13:02:57 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-12 11:23:09 +02:00
2026-09-20 13:54:31 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-12 12:24:33 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-30 23:00:12 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-02 21:06:42 +02:00
2026-09-09 10:11:36 +02:00
2026-08-25 19:26:38 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 22:43:09 +02:00
2026-10-07 20:54:10 +02:00
2026-10-07 20:54:10 +02:00
2026-10-06 22:43:09 +02:00
2026-10-07 20:54:10 +02:00
2026-10-07 20:54:10 +02:00
2026-08-01 12:45:35 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-09-23 22:35:01 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:05:02 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:05:02 +02:00
2026-10-07 16:11:41 +02:00
2026-10-07 20:54:10 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:45:21 +02:00
2026-10-08 13:02:58 +02:00
2026-10-06 19:27:30 +02:00
2026-10-07 16:59:52 +02:00
2026-08-23 11:59:12 +02:00
2026-08-15 16:42:27 +02:00
2026-08-18 22:24:29 +02:00
2026-10-06 19:27:30 +02:00
2026-09-24 14:05:42 +02:00
2026-10-06 22:43:09 +02:00
2026-08-11 09:58:37 +02:00
2026-06-16 22:22:45 +02:00