Skip to content

Project stats data model updates#368

Closed
heyheyjp wants to merge 4 commits intomasterfrom
chores/project-stats-model
Closed

Project stats data model updates#368
heyheyjp wants to merge 4 commits intomasterfrom
chores/project-stats-model

Conversation

@heyheyjp
Copy link
Collaborator

@heyheyjp heyheyjp commented Aug 3, 2016

Fixes #365.

Objectives:

  • Group cumulative stats in a single object (we'll be tracking more than ECC now)
  • Make explicit the meaning of property values (also more consistent with other models)
  • Orient player stats in a project-centric way instead of a cycle-centric way

Main Change:

Player stats data previously stored as...

{
  "ecc": 311,
  "cycleProjectECC": {
    "204125f3-ece7-42bb-8a86-a619682ff379": {
      "48382d94-dcd7-479a-9229-7db4bb364916": {
        "abc": 3,
        "ecc": 108,
        "rc": 36,
      },
    } ,
  },
}

...is now stored as...

{
  "stats": {
    "ecc": 311,

    "projects": {
      "48382d94-dcd7-479a-9229-7db4bb364916": {
        "cycles": {
          "204125f3-ece7-42bb-8a86-a619682ff379": {
            "abc": 3,
            "ecc": 108,
            "rc": 36,
          },
        },
      },
    },
  },
}

Other Changes:

  • Renamed stats-related functions referencing ECC specifically to more generic stats-related names

@heyheyjp heyheyjp added the chore label Aug 3, 2016
@heyheyjp heyheyjp force-pushed the chores/project-stats-model branch from bf8c1b1 to a433f5e Compare August 3, 2016 05:54
@jeffreywescott
Copy link
Contributor

Does this address #348?

@heyheyjp
Copy link
Collaborator Author

heyheyjp commented Aug 3, 2016

Does this address #348?

@jeffreywescott: not entirely. Gets us part of the way there, but it still needs to be added to the GraphQL schema.

@jeffreywescott
Copy link
Contributor

LGTM. 👍

@heyheyjp
Copy link
Collaborator Author

heyheyjp commented Aug 4, 2016

@jeffreywescott: added a migration script. mind taking one last look?

@jeffreywescott
Copy link
Contributor

Oooh. Nice catch on the migration and test stuff. It was too late last night when I finally got to reviewing this. :-/

Anyway, these additional commits look okay to me. I also tested them locally.

👍

@heyheyjp
Copy link
Collaborator Author

heyheyjp commented Aug 4, 2016

🙇

@heyheyjp heyheyjp force-pushed the chores/project-stats-model branch from 46e6e37 to f56f993 Compare August 4, 2016 21:48
@heyheyjp heyheyjp closed this Aug 4, 2016
@heyheyjp
Copy link
Collaborator Author

heyheyjp commented Aug 4, 2016

Closed and replaced with #369, to be merged into feature integration branch features/stats instead of directly into master.

@heyheyjp heyheyjp deleted the chores/project-stats-model branch August 4, 2016 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments