Comment

Comment by ecesena

My recommendation is to use a json blob for everything but type (that I would rename) and a unique user identifier (that I don’t see in your schema).

You will never have to query by any of these fields, and the schema is not well defined as you said. Therefore you can load all user properties by user id (or combo type + identifier), parse json blob, access any field you need.

You’ll never need a (painful) schema change.

Hope this helps, good luck!

parent ecesena 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton