Adding additional indexed properties to groups

Hey I was wondering if it’s possible to add indexed properties to groups.
For example we have a current group state (like pending, started, completed, expired) and we might only want to list groups of a certain states.
Another thing is expiration of pending and started groups so we have an expirationTimestamp.
We would like to run a cron to query the DB and update the state of all groups that should be expired.

We are currently using the lang_tag for the group state since it’s indexed I believe.
I also see in the schema that there is a disable_time for groups but it’s not used it seems?
I’m thinking we can maybe use that for the expiration timestamp.

We seem to be kind off limited here in ways of extending the groups functionality.

In the documentation it’s mentioned that it’s strongly discouraged to write custom SQL.
So I assume altering tables or adding indexes is also discouraged but is there an alternative?

Hi Jos,

You’re correct when you say that we generally discourage the use of custom SQL, as this can lead to poor performance and complications for your game. The queries that Nakama uses internally to interact with the database are highly optimised and as such where possible the built in API features such as the Storage Engine should be used instead.

If you would like to have a more detailed conversation about your game, or to discuss how we can help you write custom code for your project, please feel free to reach out to and we can talk through our various support plans to help your projects.

Kind regards,