A new table holds one Choice Surface settings document per portfolio: which securities qualify, how they are sorted, which rankings are shown, and the position, sector and dividend caps.
The document is JSON with a versioned schema key. The database checks that it is an object carrying that key; the application checks everything else before saving. Existing portfolios were given documents that reproduce the previous built-in settings exactly, by a setup script that never overwrites a saved document. Read-only checks before and after confirmed that no other table changed, and a 29-test acceptance suite ran in a throwaway database first.