Skip to content

Replace TrialMetadata table with a generic Settings key/value table - #5707

Open
johnsimons wants to merge 1 commit into
masterfrom
john/generic_settings
Open

Replace TrialMetadata table with a generic Settings key/value table#5707
johnsimons wants to merge 1 commit into
masterfrom
john/generic_settings

Conversation

@johnsimons

Copy link
Copy Markdown
Member

Replaces the single row TrialMetadata table with a generic Settings(Key, Value) table that stores JSON documents, keyed by entries in SettingKeys.

This is groundwork for the EF licensing data store, which needs to persist BrokerMetadata, AuditServiceMetadata, ReportMasks and LicensedEndpointDetails: all singleton documents in RavenDB, all read and written whole and never queried by their contents. Rather than six near identical tables, they share one.

TrialLicenseDataProvider now goes through GetSetting/StoreSetting, with writes using the existing UpsertAsync extension. Migrations for both providers drop TrialMetadata and create Settings. Nothing EF related has shipped, so no data is copied.

TrialMetadata was a one row settings table. The licensing data store needs the same shape for four more singleton values, so it is now a generic Settings(Key, Value) table holding JSON documents, with GetSetting and StoreSetting helpers on the DbContext.
@johnsimons
johnsimons force-pushed the john/generic_settings branch from 18714b7 to 5a45e25 Compare August 7, 2026 01:26

@rbev rbev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good
My only suggestion is that it might be worth writing the type name to a column for debugging/admin purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants