- Notifications
You must be signed in to change notification settings - Fork1.1k
Commit2dac342
authored
fix: add postgres triggers to remove deleted users from user_links (#12117)
* chore: add database test fixture to insert non-unique linked_ids* chore: create unit test to exercise failed email change bug* fix: add postgres triggers to keep user_links clear of deleted users* Add migrations to prevent deleted users with links* Force soft delete of users, do not allow un-delete1 parentb342bd7 commit2dac342
File tree
16 files changed
+200
-89
lines changed- cli
- coderd
- database
- dbauthz
- dbgen
- dbmem
- dbmetrics
- dbmock
- migrations
- queries
- enterprise/cli
16 files changed
+200
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 97 | + | |
102 | 98 | | |
103 | 99 | | |
104 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | 610 | | |
621 | 611 | | |
622 | 612 | | |
| |||
2881 | 2871 | | |
2882 | 2872 | | |
2883 | 2873 | | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
2889 | | - | |
2890 | | - | |
2891 | | - | |
2892 | | - | |
2893 | | - | |
| 2874 | + | |
| 2875 | + | |
2894 | 2876 | | |
2895 | 2877 | | |
2896 | 2878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | | - | |
| 1018 | + | |
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | 1022 | | |
1030 | 1023 | | |
1031 | 1024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 314 | + | |
318 | 315 | | |
319 | 316 | | |
320 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
736 | 748 | | |
737 | 749 | | |
738 | 750 | | |
| |||
5560 | 5572 | | |
5561 | 5573 | | |
5562 | 5574 | | |
| 5575 | + | |
| 5576 | + | |
| 5577 | + | |
| 5578 | + | |
5563 | 5579 | | |
5564 | 5580 | | |
5565 | 5581 | | |
| |||
6724 | 6740 | | |
6725 | 6741 | | |
6726 | 6742 | | |
6727 | | - | |
6728 | | - | |
6729 | | - | |
6730 | | - | |
6731 | | - | |
| 6743 | + | |
6732 | 6744 | | |
6733 | 6745 | | |
6734 | 6746 | | |
6735 | 6747 | | |
6736 | | - | |
6737 | | - | |
| 6748 | + | |
| 6749 | + | |
6738 | 6750 | | |
6739 | 6751 | | |
6740 | | - | |
6741 | | - | |
6742 | | - | |
6743 | | - | |
6744 | | - | |
6745 | | - | |
6746 | | - | |
6747 | | - | |
6748 | | - | |
6749 | | - | |
6750 | | - | |
6751 | | - | |
6752 | | - | |
6753 | | - | |
| 6752 | + | |
| 6753 | + | |
| 6754 | + | |
| 6755 | + | |
| 6756 | + | |
| 6757 | + | |
| 6758 | + | |
6754 | 6759 | | |
6755 | 6760 | | |
6756 | 6761 | | |
| |||
6804 | 6809 | | |
6805 | 6810 | | |
6806 | 6811 | | |
| 6812 | + | |
| 6813 | + | |
| 6814 | + | |
| 6815 | + | |
6807 | 6816 | | |
6808 | 6817 | | |
6809 | 6818 | | |
| |||
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
0 commit comments
Comments
(0)