Church Cashbook Data Schema Manual
Deanery grouping for scope assignments and reporting.
DDL required confirmation: The content below is taken directly from your
deaneries.sql paste. Once confirmed, we will extract columns/indexes/constraints into the sections above.Purpose
The deaneries table defines deanery groupings used to organise churches and support deanery-scope RBAC.
How it relates to the system
- churches.deanery_id references
deaneries.id(FK). - Deanery-scoped role assignments can grant access across multiple churches within the deanery.
DDL
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Feb 24, 2026 at 07:42 PM
-- Server version: 8.0.40
-- PHP Version: 8.3.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `church_accounts`
--
-- --------------------------------------------------------
--
-- Table structure for table `deaneries`
--
CREATE TABLE `deaneries` (
`id` int UNSIGNED NOT NULL,
`name` varchar(150) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `deaneries`
--
ALTER TABLE `deaneries`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `uq_deanery_name` (`name`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `deaneries`
--
ALTER TABLE `deaneries`
MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Operational notes
- Deaneries should be managed centrally; changes can affect RBAC and reporting.
- Avoid deletion in normal operation; treat as reference data.