gdmen / mathgame_2

0 stars 0 forks source link

Normalize database schema for most recent design #53

Closed gdmen closed 1 year ago

gdmen commented 1 year ago

PR #52 changed a number of things. And there are more things in the pipeline for https://github.com/gdmen/mathgame_2/milestone/2 . This seems like a good time to get ahead of all that and design / update the normalized database schema for the new normal.

gdmen commented 1 year ago
user: {
    auth0Id,
    id,
    email,
    username,
    pin
}

problem: {
    id,
    problem_type_bitmap,
    expression,
    answer,
    difficulty,
    disabled (bool)
}

settings: {
    user_id,
    problem_type_bitmap,
    target_difficulty,
    target_work_percentage (float)
}

videos: {
    id,
    user_id,
    url,
    title,
    thumbnail_url,
    disabled (bool)
}

event: {
    id,
    timestamp,
    user_id,
    event_type,
    value
}

gamestate: {
    user_id,
    problem_id,
    video_id,
    solved,
    target
}