You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some people have asked for the ability to add more than two nationalities.
Modify the person form in such a way that any amount of nationalities can be entered.
Things to consider:
The current db model has nationality and nationality2. This will need to change if we want to have a dynamic amount of nationalities. After talking to Päscu I've decided to let the primary nationality be for now. The secondary will probably be replaced with something that can hold up more nationalities than one.
I have not decided what to replace nationality2 with yet but here are a few Ideas im going to talk about with Robin:
JSON or JSONB Column
Serialized array
Maybe just join the tables...?
Solution
We have decided that we want to keep the original nationality attribute so a person still only can have this as the primary one. The nationality2 attribute is beeing changed into a json, so it can hold up a various number of nationalities.
The text was updated successfully, but these errors were encountered:
A branch has been created and a pull request is linked aswell. The Pull request is already closed because robin does not like open pr's.
I've wrote a migration script for the nationality2 attribute on person. Is basically just parses it from a string to a json.
I have also commented out the validation for the nationality2 attribute, which is obviously not temporarily but a solution to not get spammed with errors for now.
That's everything. There have also been changes on the schema.rb since it's now a json.
Some people have asked for the ability to add more than two nationalities.
Modify the person form in such a way that any amount of nationalities can be entered.
Things to consider:
The current db model has nationality and nationality2. This will need to change if we want to have a dynamic amount of nationalities. After talking to Päscu I've decided to let the primary nationality be for now. The secondary will probably be replaced with something that can hold up more nationalities than one.
I have not decided what to replace nationality2 with yet but here are a few Ideas im going to talk about with Robin:
Solution
We have decided that we want to keep the original
nationality
attribute so a person still only can have this as the primary one. Thenationality2
attribute is beeing changed into a json, so it can hold up a various number of nationalities.The text was updated successfully, but these errors were encountered: