Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup: database design #22

Closed
RobStallion opened this issue Oct 11, 2018 · 5 comments
Closed

Setup: database design #22

RobStallion opened this issue Oct 11, 2018 · 5 comments

Comments

@RobStallion
Copy link
Collaborator

RobStallion commented Oct 11, 2018

Design a database that will work well with the technologies being used and also deliver everything needed for the application.

The schemas should be clear and easy to understand. They should also be designed to work well with autoform so that we can quickly and easily create the forms needed for the application.

We will also be designing the database in an append only style. See here and here for more info

@RobStallion
Copy link
Collaborator Author

db-design-flow

@tiffany-tang
Copy link
Collaborator

@RobStallion As discussed earlier, at this stage, we will not be asking participating users for their first names and email. What will happen during the November testing is we will randomly distribute the usernames and pins to them.

During dev, we will provide you with the number of children taking part and the teacher's email as the Trusted Adult contact (that will be dependent on whether the teacher is willing to take part in this way, but hopefully we will have a discussion with the school soon).

@RobStallion
Copy link
Collaborator Author

@tiffany-tang Thanks for clearing that up for us. We will remove email and first_name from the user table and replace them with username.

@RobStallion
Copy link
Collaborator Author

Have had a thought on the current design for the emotion_log table. I didn't think it was best to create a row for each emotion in the table when only one will be inserted each time we insert into this table.

Redesign
img_20181015_125418

The schema will be set up to work how sql enum type works. We will be able to set a list of emotions that will be able to be inserted. If any other string is tried to be inserted it will return the changeset with an error.

@RobStallion
Copy link
Collaborator Author

Diagram in comment above should also contain a field called emotion_id which will be type integer.

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

No branches or pull requests

3 participants