# Accounting DB guard deployment

`ACC-P1-10` creates MySQL triggers that protect posted journals and append-only accounting records. The migration must run with a database account permitted to create triggers. When binary logging is enabled, the deployment owner must provide the required privilege or enable `log_bin_trust_function_creators` according to the approved DB policy.

Do not silently proceed without triggers. If creation fails, stop the deployment and record an OD-13 exception signed by the client and tech lead. The temporary alternative—application checks plus the future nightly `posted_hash` integrity check—is weaker and is not equivalent protection.

Never run this migration's `down()` in production. It drops the immutability triggers. Correct posted data only through reversal or adjustment; do not disable triggers or edit ledger rows with SQL.

After deployment, verify the named triggers exist in `information_schema.TRIGGERS`, then run the MySQL `GuardTriggerTest` suite against a dedicated test database.
