Describe the bug
A lot of our database tables have a filed of type json called meta. It's relatively free form. But, there should be some regulation to ensure it doesn't become an unruly mess.
https://github.com/F3-Nation/f3-nation/blob/dev/packages/shared/src/app/types.ts is a start at regulating it. But it's inconsistent.
- Not all tables have fields fully typed. EventMeta, LocationMeta and others have a few fields described (like eventTypeId). Others like UserMeta are completely empty.
- Case is not standard. In the above file, everything is camelCase. But there are a number of untyped field actively used in the database that are snake case. We should standardize.
Here's an example of user.meta from the db.
{
"my_f3_why": "To be able to keep up with my kids. ",
"brought_by": 24414,
"f3_name_origin": "At my first workout I was wearing a hoody from my high school rugby team. They asked me if i played. I said “I did, until I realized I don’t like tackling or being tackled.”",
"start_date_override": "2021-10-12",
"onboarding_completed": true,
"user_emergency_info_dr_sharing": true
}
Additional information
This standardization would apply to all ###Meta Types.
Describe the bug
A lot of our database tables have a filed of type json called meta. It's relatively free form. But, there should be some regulation to ensure it doesn't become an unruly mess.
https://github.com/F3-Nation/f3-nation/blob/dev/packages/shared/src/app/types.ts is a start at regulating it. But it's inconsistent.
Here's an example of user.meta from the db.
{
"my_f3_why": "To be able to keep up with my kids. ",
"brought_by": 24414,
"f3_name_origin": "At my first workout I was wearing a hoody from my high school rugby team. They asked me if i played. I said “I did, until I realized I don’t like tackling or being tackled.”",
"start_date_override": "2021-10-12",
"onboarding_completed": true,
"user_emergency_info_dr_sharing": true
}
Additional information
This standardization would apply to all ###Meta Types.