|
| 1 | +# Disable foreign key checks to until all tables are created |
| 2 | +SET FOREIGN_KEY_CHECKS=0; |
1 | 3 |
|
2 | 4 | # |
3 | 5 | # Table structure for table `access_log` |
@@ -774,6 +776,23 @@ CREATE TABLE `user_teams` ( |
774 | 776 | ); |
775 | 777 | # -------------------------------------------------------- |
776 | 778 |
|
| 779 | +# |
| 780 | +# Table structure for table `user_teams_membership` |
| 781 | +# |
| 782 | +# Creation: |
| 783 | +# Last update: |
| 784 | +# |
| 785 | + |
| 786 | +CREATE TABLE `user_teams_membership` ( |
| 787 | + `u_id` int(11) unsigned NOT NULL, |
| 788 | + `t_id` int(11) unsigned NOT NULL, |
| 789 | + PRIMARY KEY (`u_id`,`t_id`), |
| 790 | + KEY (`t_id`), |
| 791 | + FOREIGN KEY (`u_id`) REFERENCES `users` (`u_id`), |
| 792 | + FOREIGN KEY (`t_id`) REFERENCES `user_teams` (`id`) |
| 793 | +); |
| 794 | +# -------------------------------------------------------- |
| 795 | + |
777 | 796 | # |
778 | 797 | # Table structure for table `users` |
779 | 798 | # |
@@ -813,23 +832,6 @@ CREATE TABLE `users` ( |
813 | 832 | ); |
814 | 833 | # -------------------------------------------------------- |
815 | 834 |
|
816 | | -# |
817 | | -# Table structure for table `user_teams_membership` |
818 | | -# |
819 | | -# Creation: |
820 | | -# Last update: |
821 | | -# |
822 | | - |
823 | | -CREATE TABLE `user_teams_membership` ( |
824 | | - `u_id` int(11) unsigned NOT NULL, |
825 | | - `t_id` int(11) unsigned NOT NULL, |
826 | | - PRIMARY KEY (`u_id`,`t_id`), |
827 | | - KEY (`t_id`), |
828 | | - FOREIGN KEY (`u_id`) REFERENCES `users` (`u_id`), |
829 | | - FOREIGN KEY (`t_id`) REFERENCES `user_teams` (`id`) |
830 | | -); |
831 | | -# -------------------------------------------------------- |
832 | | - |
833 | 835 | # |
834 | 836 | # Table structure for table `usersettings` |
835 | 837 | # |
@@ -868,3 +870,6 @@ CREATE TABLE `wordcheck_events` ( |
868 | 870 | ); |
869 | 871 | # -------------------------------------------------------- |
870 | 872 |
|
| 873 | +# Re-enable foreign key checks |
| 874 | +SET FOREIGN_KEY_CHECKS=1; |
| 875 | + |
0 commit comments