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

166152325 Adds relation between workout log and workout session #19

Merged

Conversation

justMuriithi
Copy link
Contributor

@justMuriithi justMuriithi commented Jun 12, 2019

Title

Adds a relation between workout log and workout session

Description

Right now the workout logs and the workout session are only linked through the date (for sessions this value is unique and enforced by the DB). This presents in some places a problem since it's not possible to just follow a foreign key relationship with the ORM like in other places.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

  • This change requires a documentation update

How Has This Been Tested?

  • unit tests

Acceptance Criteria:

Checklist:

  • Adds field session to workoutlog as a foreign key
  • Adds tests to show relationship between workoutlog and workoutsession

PT stories

#166152325

Screenshots

As can be viewed below, once a workout log is created, it is auto-populated with the respective session id. This can be verified by browsing the database with a tool like pgAdmin
Screenshot 2019-06-13 at 14 26 54

@justMuriithi justMuriithi added 🚧 Work in Progress When a PR is not yet ready to be reviewed 👍 ready Ready for review and removed 🚧 Work in Progress When a PR is not yet ready to be reviewed labels Jun 12, 2019
Copy link
Contributor

@martinMutuma martinMutuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work. The link between workoutlog and session has been established. The pr meets all checks on the description

Copy link
Contributor

@bencyn bencyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected. The session id foreign key is being registered once a new workout log is added.

Copy link
Contributor

@Tevinthuku Tevinthuku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, the relation has been established successfully

Copy link
Contributor

@misocho misocho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job implementing the workout log and workout session relationship. 👍🏾

- Adds field session to workoutlog
- Adds tests to show relationship between workoutlog and workoutsession

[Delivers #166152325]
@justMuriithi justMuriithi force-pushed the story/166152325-workout-log-session-relation branch from 5e48e85 to a53cc6e Compare June 14, 2019 08:10
@michael-basweti michael-basweti self-requested a review June 14, 2019 08:23
Copy link
Contributor

@michael-basweti michael-basweti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please increase coverage

@justMuriithi
Copy link
Contributor Author

Please increase coverage

Coverage is well taken care of as it ought to be.

@michael-basweti michael-basweti merged commit e9eb0ef into develop Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 ready Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants