Commit 01bad8d
committed
Remove the
This table was always one-to-one with the emails table, and we should
have always been updating it when the email was updated. This moves all
of that logic into the database, and merges the two tables.
The only reason that these tables were ever separate as far as I can
tell was to represent when the confirmation email hadn't been sent.
However, we can just do that with a nullable column.
However, having the `token` column leads to some awkward `unwrap`s in
the code where we return it, since we know that updating the `email`
always generates a new token. For that reason I have made the `token`
column `NOT NULL`, but left the timestamp nullable. Rows in the `emails`
table that did not previously have an associated `token` row will have a
`NULL` value for this column.tokens table1 parent fba2ade commit 01bad8d
7 files changed
+134
-196
lines changedLines changed: 17 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 | + | |
Lines changed: 30 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 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
440 | 452 | | |
441 | 453 | | |
442 | 454 | | |
| |||
558 | 570 | | |
559 | 571 | | |
560 | 572 | | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | 573 | | |
594 | 574 | | |
595 | 575 | | |
| |||
784 | 764 | | |
785 | 765 | | |
786 | 766 | | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | 767 | | |
792 | 768 | | |
| 769 | + | |
793 | 770 | | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
794 | 774 | | |
795 | 775 | | |
| 776 | + | |
796 | 777 | | |
797 | | - | |
798 | | - | |
799 | 778 | | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
800 | 783 | | |
801 | 784 | | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
| 785 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
658 | 657 | | |
659 | 658 | | |
660 | 659 | | |
661 | | - | |
| 660 | + | |
662 | 661 | | |
663 | 662 | | |
664 | 663 | | |
| |||
675 | 674 | | |
676 | 675 | | |
677 | 676 | | |
678 | | - | |
| 677 | + | |
679 | 678 | | |
680 | 679 | | |
681 | 680 | | |
| |||
686 | 685 | | |
687 | 686 | | |
688 | 687 | | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
698 | 692 | | |
699 | 693 | | |
700 | 694 | | |
| |||
707 | 701 | | |
708 | 702 | | |
709 | 703 | | |
710 | | - | |
| 704 | + | |
711 | 705 | | |
712 | 706 | | |
713 | 707 | | |
| |||
719 | 713 | | |
720 | 714 | | |
721 | 715 | | |
722 | | - | |
723 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
724 | 719 | | |
725 | 720 | | |
726 | 721 | | |
| |||
731 | 726 | | |
732 | 727 | | |
733 | 728 | | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
748 | 732 | | |
749 | | - | |
750 | | - | |
751 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
752 | 740 | | |
753 | 741 | | |
754 | 742 | | |
| |||
0 commit comments