Webhook trigger update by column (#832)

Add functionality to filter webhooks based on a column or columns.
This commit is contained in:
CamilleLegeron
2024-04-12 22:04:37 +02:00
committed by GitHub
parent 73a02fdebd
commit 76ef4d54f8
13 changed files with 270 additions and 58 deletions

View File

@@ -1307,3 +1307,13 @@ def migration41(tdset):
]
return tdset.apply_doc_actions(doc_actions)
@migration(schema_version=42)
def migration42(tdset):
"""
Adds column to register which table columns are triggered in webhooks.
"""
return tdset.apply_doc_actions([
add_column('_grist_Triggers', 'watchedColRefList', 'RefList:_grist_Tables_column'),
add_column('_grist_Triggers', 'options', 'Text'),
])

View File

@@ -15,7 +15,7 @@ import six
import actions
SCHEMA_VERSION = 41
SCHEMA_VERSION = 42
def make_column(col_id, col_type, formula='', isFormula=False):
return {
@@ -261,6 +261,8 @@ def schema_create_actions():
make_column("label", "Text"),
make_column("memo", "Text"),
make_column("enabled", "Bool"),
make_column("watchedColRefList", "RefList:_grist_Tables_column"),
make_column("options", "Text"),
]),
# All of the ACL rules.