r_project_user.sql 722 B

1234567891011121314151617181920212223242526272829303132
  1. -- --------------------------------------------------------
  2. --
  3. -- Table structure for table `r_project_user`
  4. --
  5. -- Creation: Aug 21, 2015 at 06:53 PM
  6. --
  7. DROP TABLE IF EXISTS `r_project_user`;
  8. CREATE TABLE IF NOT EXISTS `r_project_user` (
  9. `p_id` int(10) NOT NULL,
  10. `u_id` int(11) NOT NULL,
  11. `r_id` int(11) NOT NULL
  12. ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_bin;
  13. --
  14. -- RELATIONS FOR TABLE `r_project_user`:
  15. -- `p_id`
  16. -- `projects` -> `id`
  17. -- `u_id`
  18. -- `users` -> `id`
  19. -- `r_id`
  20. -- `project_roles` -> `id`
  21. --
  22. --
  23. -- Indexes for table `r_project_user`
  24. --
  25. ALTER TABLE `r_project_user`
  26. ADD UNIQUE KEY `p_id` (`p_id`,`u_id`,`r_id`),
  27. ADD KEY `u_id` (`u_id`),
  28. ADD KEY `r_id` (`r_id`);