Jbays / gymnastics-tracker

full stack app to track my gymnastics progress
0 stars 0 forks source link

design backend #2

Open Jbays opened 6 years ago

Jbays commented 6 years ago

I need schema mockups and designs (ERD) for gymnastics tracker.

For each gymnastic progression, what data do I need to store??

Jbays commented 6 years ago

ERD 2nd Draft

Jbays commented 6 years ago

For simplicity's sake, I will omit stretches from my database concerns. FOR NOW!

I'm adding to the schema -- such that workout history can be stored.

Jbays commented 6 years ago

9

knex and postgres are definitely connected and working!

Now I'll work on further refining my database schema. Making a db to handle gymnastics progressions is tricky!

Jbays commented 6 years ago

5th iteration of gymnastics-tracker ERD.

https://www.draw.io/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1#G1Lr1w4vGGSwYnSaRR0P6HKBU9Nit5ZoKE

Remaining questions:

  1. How do I keep track of workout history? Trying to solve for how will my app recommend the next progression step.
  2. How will I handle stretch progressions? Problem remains unsolved.
Jbays commented 6 years ago

I can add stuff to my database. Everything works as expected. Below is an example.

//this adds a plank workout to my workout history INSERT INTO workouts(workout_id,timestamp,progression_id,sequence_number,step_sequence,completed,workout_note) VALUES(150,'22 september 2018',4,3,9,true,'this is a workout that I added by hand') INSERT INTO users_workouts(user_id,workout_id) VALUES(1,150)

DELETE FROM workouts where workout_id = 150; DELETE FROM users_workouts where workout_id = 150;

Jbays commented 6 years ago

How to structure the table which'll contain workout history for stretches?!

Jbays commented 6 years ago

I hate the names for my tables and keys.

tables: progressions_exercises_mastery mastery stretches_progressions_mastery

What's a better word than mastery? Standards? Standards table?