Church Cashbook Data Schema Manual
Canonical category definitions used for reporting and budgeting.
DDL source: uploaded
master_categories.sql.Purpose
The master_categories table defines the canonical category list available across the system. These are typically income/expense classifications used for reporting and budgeting.
How it relates to the system
- May be copied or referenced into
church_categoriesfor church-specific use. - Used by reporting (Monthly Summary, Year-End Pack, Budget variance).
Columns
- id —
intUNSIGNED NOT NULL - name —
varchar(150)NOT NULL - kind —
enum('income','expense') NOT NULL - is_active —
tinyint(1)NOT NULL DEFAULT '1' - sort_order —
intNOT NULL DEFAULT '0'
Indexes
- PRIMARY KEY `id`
Constraints
- No foreign keys detected in pasted DDL.
Operational notes
- Reference data: treat as semi-static configuration data.
- Governance: changing or deleting master categories can affect reporting consistency across churches.
- Best practice: prefer deactivation (if supported) rather than deletion.
DDL
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Feb 24, 2026 at 07:53 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 `master_categories`
--
CREATE TABLE `master_categories` (
`id` int UNSIGNED NOT NULL,
`name` varchar(150) NOT NULL,
`kind` enum('income','expense') NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`sort_order` int NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `master_categories`
--
ALTER TABLE `master_categories`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `uq_master_name_kind` (`name`,`kind`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `master_categories`
--
ALTER TABLE `master_categories`
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 */;