Church Cashbook
Maintenance Manual
Manual home Return to Church Cashbook

Church Cashbook Maintenance Manual

Document schema freeze and change management.

Principles

Church Cashbook handles financial data subject to HMRC requirements and Charity Commission oversight. Changes to the live system — whether code, schema, or configuration — must be controlled, tested, and documented. The core principle is: never deploy untested code to production, and always have a rollback plan.

Types of change

Before any change to production

MariaDB/MySQL compatibility rule

The development environment uses MySQL 8.0 (MAMP) and production uses MariaDB 11.4 (Rochen). All SQL must be compatible with both. Specifically: never use VALUES() in ON DUPLICATE KEY UPDATE clauses (use row alias syntax instead); never use utf8mb4_0900_ai_ci collation (use utf8mb4_unicode_ci); never use DATABASE() in information_schema queries (use the literal schema name 'church_accounts'). A passing test in MAMP does not guarantee production compatibility.

Schema freeze

Once the system is live with parish data, schema changes require extra care. Any migration that modifies columns used in Gift Aid claim exports, transaction records, or audit logs must be reviewed against HMRC record-keeping requirements before deployment. The Schema Manual documents the invariants that must not be broken.

Dev-only files — must not be deployed to production

The following files and directories exist in the development environment only. They must never be present on the live Rochen server — they serve no purpose in production and increase the attack surface.

Before any production deployment, confirm none of the above are present on the server. The tests/ directory in particular contains SQL insert statements and known test credentials that must not be accessible on a live server.

Deployment gate: Verifying the absence of dev-only files is a mandatory step in the pre-deployment checklist. See Pre-deployment checklist for the full set of gates to clear before any production deployment.