Skip to content

Commit

Permalink
make more clear which operations for which trigger types
Browse files Browse the repository at this point in the history
  • Loading branch information
MongoCaleb committed Oct 16, 2023
1 parent 29969a3 commit 90edce6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/reference/config/triggers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ Database Triggers

Database trigger configurations conform to the base trigger schema with
additional configuration options that specify which collection to watch and when
to fire the trigger. The following fields exist in *database* trigger
configuration files:
to fire the trigger. The following fields exist in *database* and *deployment*
trigger configuration files:

.. code-block:: json
:caption: triggers/<trigger name>.json
Expand Down Expand Up @@ -150,12 +150,15 @@ configuration files:
- A list of one or more :ref:`database operation
types <database-event-operation-types>` that cause the trigger to fire.

Valid operations types:
Valid operations types for all triggers:

- ``"INSERT"``
- ``"UPDATE"``
- ``"REPLACE"``
- ``"DELETE"``

Valid operations types for database and deployment triggers:

- ``"CREATE_COLLECTION"``
- ``"MODIFY_COLLECTION"``
- ``"RENAME_COLLECTION"``
Expand All @@ -165,6 +168,9 @@ configuration files:
- ``"REFINE_COLLECTION_SHARD_KEY"``
- ``"CREATE_INDEXES"``
- ``"DROP_INDEXES"``

Valid operations types for deployment triggers only:

- ``"DROP_DATABASE"``

.. tip::
Expand Down

0 comments on commit 90edce6

Please sign in to comment.