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

Extra fields should not exist in numbered fields like field_1, field_2, etc. #559

Open
brassy-endomorph opened this issue Sep 9, 2024 · 0 comments

Comments

@brassy-endomorph
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

We have several fields named field_name_X where X is an int. This limits us to a finite number and forces us to manually create an array to iterate over. We also would need some strange logic to keep them full at the smaller index (e.g., field_1 will never be null if field_2 is non-null).

Describe the solution you'd like

We should use a second table and join it to the users table. This is preferrable to making each field its own array since they are strictly relatated.

Describe alternatives you've considered

We could have one field called extra_fields in the current table that is a JSONB[] type which contains objects that have three fields: label, value, and verified. This looser schema could lead to the introduction of errors, and it would be preferable to use PG to enforce a strict schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant