RhysR
Convex Communityโ€ข5mo agoโ€ข
2 replies
Rhys

Storing entity settings in Convex

๐Ÿ‘‹ Moving over to Convex from MySQL and was wondering on schema design

At the moment, per entity I store settings in a bitfield int - so for example for a server it is:

Server
{
name: string
bitfield: number
}

In that bitfield, if a setting is enabled a bit gets flipped so if it has the all messages as public & the anonymize messages bits it'd be 011

Is this worth to keep doing or should I just have settings be stored as individual fields on the entity?

Thinking of in convex having this be:

Server{
name: string
enableAllMessagesAsPublic: date | null
enableAnonymizeMessages: date | null
}
Was this page helpful?