parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Remove config `databaseURI`, `databaseOptions`, `collectionPrefix` in favor of `databaseAdapter`

Open mtrezza opened this issue 1 month ago • 1 comments

New Feature / Enhancement Checklist

Current Limitation

There are databaseURI , databaseOptions, collectionPrefix and databaseAdapter as config options. That is redundant:

  • It seems to be that databaseOptions takes some Parse Server custom options and some options that are then passed directly to the DB client. This requires complex filtering.
  • There are many native DB client options that are not supported by Parse Server because Parse Server validates native DB client options before passing them on. This validation is unnecessary and causes Parse Server to chronically lag behind supporting the latest DB driver options.

Feature / Enhancement Description

  • Remove databaseOptions and move the Parse Server native options, like enableSchemaHooks, schemaCacheTtl, etc. into a new sub key DatabaseAdapter.options. The DB client options can already be passed via DatabaseAdapter.mongoOptions for example. It may make sense to keep databaseOptions for Parse Server native options if it turns out too complex to pass them via the DB adapter, as it affects features like schema hooks that are implemented in Parse Server core, rather than the DB adapter.
  • Remove option databaseURI, as this can already be provided via DatabaseAdapter.uri.
  • Remove any obsolete logic like parsing the databaseURI string to auto-determine which DB the URI points to, to then automatically load the correct adapter.

This is in line with the larger plan to move all DB adapters out of the Parse Server core repository.

Example Use Case

Alternatives / Workarounds

3rd Party References

mtrezza avatar Nov 07 '25 18:11 mtrezza

🚀 Thanks for opening this issue! We are excited about your ideas for improvement!