I'm building a site using rails that will have 1000s of custom forms. Before we build a form builder user interface, we'll be essentially creating and storing the "schema" manually and using the "schema" to build the form.
I had originally posted this question to help figure out how to create the form from a YAML file: Create a form in rails by reading a yaml file
But after doing some research, it seems like it would be better to store the "schema" in our db and now I'm wondering what the best way is to do that. It seems like there's a "jsonb" type for postgres dbs that I could use - is that better than storing the "schema" as YAML data? And would I use the "bytea" type for this type of data? Are there any thoughts on if it would be better to use JSON or YAML? Also, do I just put the contents of the schema in the db or is there a way to just store a file?
I would use the native Postgres JSON type.