Commit 46ed6db
authored
fix new user signup (tldraw#7093)
ayyy I forgot to add the groups_backend flag for new users in tldraw#7058
which means that people who have been signing up since then have still
been using the old data model. it's no biggie, just requires slight
adjustment to the migration script.
### Change type
- [ ] `bugfix`
- [ ] `improvement`
- [ ] `feature`
- [ ] `api`
- [x] `other`
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Ensure new users get `groups_backend` flag and update the migration to
use `ON CONFLICT DO NOTHING` for safe re-runs.
>
> - **Backend**
> - Set `user.flags` to `groups_backend` on user creation in
`apps/dotcom/sync-worker/src/TLUserDurableObject.ts`.
> - **Database Migration**
(`apps/dotcom/zero-cache/migrations/023_groups.sql`)
> - Add `ON CONFLICT DO NOTHING` to inserts into `group`, `group_user`,
and `group_file` in `migrate_user_to_groups` to make it idempotent.
> - Standardize flag to `groups_backend` in migration flag updates and
comments.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cdf92fd. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 882ff73 commit 46ed6db
2 files changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
| 408 | + | |
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
411 | | - | |
| 412 | + | |
| 413 | + | |
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
| |||
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
423 | | - | |
| 425 | + | |
| 426 | + | |
424 | 427 | | |
425 | 428 | | |
426 | 429 | | |
| |||
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
436 | | - | |
| 439 | + | |
437 | 440 | | |
438 | 441 | | |
439 | 442 | | |
| |||
0 commit comments