Database change

ps_db_execute

Write · preview + approveBlock 5 · Service mode (service connector, off by default)Paid version onlyService connector onlyBlock off after install

In service mode, makes a direct change in the shop's database after showing how many rows it touches, and keeps a copy of those rows so the change can be undone.

Free TellMyShop Audit: No. This tool is only in the paid version of TellMyShop. The free TellMyShop Audit has only tools that read your store.

Ask Claude

„Set the in-stock message "Ships within 24 hours" on all English product pages where it is empty.”

Example preview

UPDATE ps_product_lang SET available_now = 'Ships within 24 hours' WHERE id_lang = 2 AND available_now = '': 38 rows will change (limit 100). Sample: id_product 45, 77, 112 (available_now: empty). A copy of the 38 rows will be kept for undo.

Technical details

SERVICE MODE. Changes the database: INSERT, UPDATE, DELETE, REPLACE (one statement). Table prefix ps_. The preview shows how many rows will change and a sample. Runs in a transaction: if more rows change than max_rows, it rolls back. UPDATE and DELETE on one table keep a copy of the affected rows (undo with ps_revert_change). UPDATE or DELETE without WHERE needs all_rows=true. ALTER, CREATE, DROP and TRUNCATE only with allow_ddl=true, and they CAN'T BE UNDONE. A database change bypasses PrestaShop: module hooks don't run and the cache isn't cleared, so if a block 1-4 tool can make the change, Claude uses that tool. Same blocked tables and customer data rules as ps_db_query.

Parameters

NameTypeRequiredDescription
sqlstringyesSQL statement. Max 50,000 characters.
max_rowsintegernoMaximum number of changed rows (safety fuse). Range 1 to 1000. Default 100.
all_rowsbooleannotrue = deliberately run UPDATE/DELETE without WHERE. Default false.
allow_ddlbooleannotrue = allow ALTER/CREATE/DROP/TRUNCATE (can't be undone). Default false.
confirmbooleannofalse (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token.
change_tokenstringwhen: confirm=trueToken from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state.

Limits

Service mode only: block 5 is switched on for 1, 4, 8 or 24 hours and works through the service connector from allowlisted IP addresses. One statement, max 50,000 characters. max_rows default 100, max 1000. Row copy for undo only for single-table UPDATE/DELETE, up to 1000 rows. Structure changes (DDL) can't be undone.

What you see before anything is saved

Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.

Related tools

Use cases with this tool

Last updated: 2026-10-05