Run a database modification
run_db_modificationExecute a saved database modification (INSERT/UPDATE/DELETE) by name. Requires confirmation and safeguards against unfiltered mass writes.
Instructions
Execute a saved db_modification (INSERT/UPDATE/DELETE) by name. This WRITES to a database — and database writes have NO snapshot/rollback, unlike portal content. Requires data writes enabled (PORTAL_ALLOW_DATA_WRITES=1) and confirm=true. Refuses an unscoped mass write (UPDATE/DELETE/MERGE without a real WHERE — 1=1 doesn't count — TRUNCATE, DROP, ALTER…DROP, GRANT/REVOKE) unless allow_unfiltered=true; the check is a best-effort classifier and fails closed if the SQL can't be inspected. Pass params as a { name: value } map, or params_list for bulk rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | db_modification name to run. | |
| params | No | Single-row parameters as a { name: value } map. | |
| confirm | Yes | Must be true to actually run — guards against accidental DB writes. | |
| autocommit | No | Commit each statement (default portal behavior). | |
| params_list | No | Bulk parameters: a list of { name: value } maps, one per row. | |
| allow_unfiltered | No | Must be true to run an UNSCOPED mass write (UPDATE/DELETE without WHERE, TRUNCATE, DROP). Default false. | |
| ignore_sql_errors | No | Continue past SQL errors. |