I am creating a new table in a MySQL database in a Rails project. The problem is that some fields will always be on the table, but other fields I do not know yet--they will be user generated. I know that it is impossible to add fields dynamically to a table. Therefore, are there any good established solutions for this? Perhaps a gem?
To be clear, let's say I have a table called UserInformation. It has the columns name, gender, height. But I need to allow the entry of whatever else a user wants. So, for User A I need to store name, gender, height, weight. For User B I need to store name, gender, height, and favorite_tv_show. For User C I need to store name, gender, height, and favorite_tv_show, favorite_color, mothers_name.
Because I do not know all the potential attributes, I cannot add them in advance as column names.
I can't imagine I'm the first one to hit this problem. Thank you very much in advance!