reinhardt
reinhardt

Reputation: 361

Firebase import db without triggering functions

We are running Firebase with multiple environments/stages. To test migrations, we are constantly rolling back, importing a database state through the CLI. The problem is: Our functions are triggered as well. In that scenario, we just want to alter the db without any side effects. Is it possible to hibernate all functions in any way?

Upvotes: 5

Views: 268

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598857

There is no way to temporarily disable Cloud Functions, nor to prevent them from running based on the source of data.

The closest I can think of is:

  1. Deploy an empty index.js to remove all functions
  2. Port your data
  3. Deploy your original index.js to re-add the functions

Upvotes: 4

Related Questions