You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 28, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 28, 2026. It is now read-only.
How can I choose a custom database ID instead of the (default) one? #130
@kossnocorp apologies for raising this again, I tried using the schema option like you have suggested, but it didn't work as expected.
Below is the logic used in typesaurus to get firestore, when we pass { app: 'some-name' } assuming some-name is the name of the firestore database. we are getting app instance with different name, but firestore is still using default database (getFirestore logic added below). Also I don't see a option to pass to initializeApp
@kossnocorp Can we get a bit of love on this issue and get this merged and released? Not being able to select a different DB is a hard blocker for many I'm sure. This feature has been GA in Firestore since February.
Activity
kossnocorp commentedon Apr 19, 2024
Hey! You can configure it using the options
schemaargument: https://typesaurus.com/api/schema/#appmailaneel commentedon Apr 20, 2024
@kossnocorp apologies for raising this again, I tried using the schema option like you have suggested, but it didn't work as expected.
Below is the logic used in typesaurus to get firestore, when we pass
{ app: 'some-name' }assumingsome-nameis the name of the firestore database. we are getting app instance with different name, but firestore is still using default database (getFirestore logic added below). Also I don't see a option to pass to initializeAppgetFirestorefrom firebase.jskossnocorp commentedon May 13, 2024
Hey, sorry that it doesn't work for you. Let me reopen the issue, add tests and fix it.
ecaroth commentedon Aug 22, 2024
I had this need myself, just submitted a PR that fixes it @kossnocorp
#139
aaaaahaaaaa commentedon Sep 9, 2024
@kossnocorp Can we get a bit of love on this issue and get this merged and released? Not being able to select a different DB is a hard blocker for many I'm sure. This feature has been GA in Firestore since February.
LeoTheG commentedon Sep 8, 2025
@kossnocorp are there any updates on this? It's critical to my work that we're able to specify DBs
ochoalopezalfredo commentedon Nov 28, 2025
@LeoTheG , @aaaaahaaaaa, @mailaneel
@kossnocorp I create the PR #147 that solve this issue
Regards