Church Cashbook
Data Schema Manual
Manual home Return to Church Cashbook

Table: users

Application users (authentication + identity).

Purpose

Describe why this table exists and what it stores.

Relationships

Columns

Column Definition
idint UNSIGNED NOT NULL
usernamevarchar(50) NOT NULL
passwordvarchar(255) DEFAULT NULL
emailvarchar(255) NOT NULL
is_activetinyint(1) NOT NULL DEFAULT '1'
realnamevarchar(255) NOT NULL
last_successful_logindatetime DEFAULT NULL
previous_logindatetime DEFAULT NULL

Indexes

List primary key and secondary indexes (if any).

Constraints

List foreign keys and other constraints (if any).

Operational notes / invariants

DDL

CREATE TABLE `users` (
  `id` int UNSIGNED NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) DEFAULT NULL,
  `email` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `realname` varchar(255) NOT NULL,
  `last_successful_login` datetime DEFAULT NULL,
  `previous_login` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;