Skip to content

Instantly share code, notes, and snippets.

@cadecairos
Last active October 7, 2015 18:39
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 cadecairos/7fc5d34de8d7047ec650 to your computer and use it in GitHub Desktop.
Save cadecairos/7fc5d34de8d7047ec650 to your computer and use it in GitHub Desktop.
Entity-Relationship Diagrams for id.webmaker.org and login.webmaker.org, using http://hackage.haskell.org/package/erd
title {
label: "mozilla/id.webmaker.org ERD", size: "20"
}
[Clients]
*client_id
client_secret
allowed_grants
allowed_responses
redirect_url
[Auth_Codes]
*auth_code
user_id
scopes
expires_at
created_at
+client_id
[Access_Tokens]
*access_token
scopes
created_at
user_id
+client_id
Clients *--1 Auth_Codes
Clients *--1 Access_Tokens
title {
label: "mozilla/login.webmaker.org ERD", size: "20"
}
[User]
*id
email
username
verified
prefLocale
fullName
deletedAt
lastLoggedIn
usePasswordLogin
isAdmin
isCollaborator
isSuspended
isMentor
isSuperMentor
sendNotifications
sendEngagements
sendEventCreationEmails
sendMentorRequestEmails
sendCoorganizerNotificationEmails
subscribeToWebmakerList
bio
location
links
avatar
emailHash
displayName
[ReferrerCode]
referrer
userStatus
+user_id
[Password]
saltedHash
+user_id
[LoginToken]
token
used
+user_id
[ResetCode]
code
used
invalid
+user_id
[OAuthLogin]
*id
+user_id
[OAuthClient]
*id
client
User ?--1 Password
User *--1 LoginToken
User *--1 ResetCode
User *--1 ReferrerCode
User *--1 OAuthLogin
OAuthLogin 1--* OAuthClient
title {
label: "Proposed ERD for id.webmaker.org", size: "20"
}
[Clients]
*client_id
client_secret
allowed_grants
allowed_responses
redirect_url
[Auth_Codes]
*auth_code
scopes
expires_at
created_at
+client_id
+user_id
[Access_Tokens]
*access_token
scopes
created_at
+user_id
+client_id
[Scopes]
*scope
[Scopes_Auth_Codes]
+scope
+auth_code
[Scopes_Access_Tokens]
+scope
+access_token
[Users]
*id
email
username
prefLocale
[Passwords]
saltedHash
+user_id
[Reset_Codes]
code
used
invalid
+user_id
Clients *--1 Auth_Codes
Clients *--1 Access_Tokens
Users ?--1 Passwords
Users *--1 Reset_Codes
Users *--1 Auth_Codes
Users *--1 Access_Tokens
Scopes 1--1 Scopes_Auth_Codes
Scopes 1--1 Scopes_Access_Tokens
Auth_Codes +--1 Scopes_Auth_Codes
Access_Tokens +--1 Scopes_Access_Tokens
@cadecairos
Copy link
Author

mozilla/id-webmaker-org ERD

mozilla/id-webmaker-org ERD

mozilla/login-webmaker-org ERD

mozilla/login-webmaker-org ERD

proposed ERD for id-webmaker-org

see next comment

@cadecairos
Copy link
Author

updated proposal

screenshot from 2015-10-07 14-16-04

@cadecairos
Copy link
Author

  • combine user and password together
  • consider how to handle scopes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment