Skip to content

Instantly share code, notes, and snippets.

@santospatrick
Created May 6, 2024 14:54

Revisions

  1. santospatrick renamed this gist May 6, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. santospatrick created this gist May 6, 2024.
    13 changes: 13 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    ### this will select staging and export indexes
    ```bash
    firebase use default
    firebase firestore:indexes > firestore.indexes.json
    ```

    ### then we need to import them in production, so we don't need to create all of them manually (could be 20+ and it takes some time)
    ```bash
    firebase use production
    firebase deploy --only firestore:indexes
    ```

    Make sure `firebase.json` is pointing to the correct file `firestore.indexes.json` at field `firestore.indexes`