Skip to content

Instantly share code, notes, and snippets.

@radavis
Created September 16, 2014 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radavis/a2c77c211b5ae6994c08 to your computer and use it in GitHub Desktop.
Save radavis/a2c77c211b5ae6994c08 to your computer and use it in GitHub Desktop.

Task Galaxy

ER Diagram

 +----------+            +------------+
 |users     |            |tasks       |
 +----------+            +------------+
 |*email    |           /|*name       |
 |first_name+------------+description |
 |last_name |           \|due_date    |
 |          |            |user_id     |
 +----+-----+            |task_list_id|
      |                  +------+-----+
      |                        \|/
      |                         |
      |                         |
      |                         |
     /|\                        |
+-----+-------+           +-----+-----+
|shared_lists |           |task_lists |
+-------------+           +-----------+
|*task_list_id|\          |*name      |
|*user_id     +-----------+description|
|             |/          |           |
|             |           |           |
+-------------+           +-----------+
  • a user has many tasks
  • a task belongs to a user
  • a task belongs to a task_list
  • a task_list has many tasks
  • a task_list has many users through shared_lists
  • a user has many task_lists through shared_lists
  • a shared_list belongs to a user
  • a shared_list belongs to a task_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment