From 9b8eaa5fd5065ac1e2aa1fd05abd849a4ed1c419 Mon Sep 17 00:00:00 2001 From: vrana Date: Thu, 19 Apr 2012 15:13:52 -0700 Subject: [PATCH] Document enum database type Test Plan: Read. Reviewers: epriestley Reviewed By: epriestley CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2286 --- src/docs/developer/database.diviner | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/docs/developer/database.diviner b/src/docs/developer/database.diviner index 9c90d5acc9..f340f13661 100644 --- a/src/docs/developer/database.diviner +++ b/src/docs/developer/database.diviner @@ -63,6 +63,10 @@ of it. The other reason is that PHP internally uses numbers for storing dates. Phabricator uses UTF-8 encoding for storing all text data. We use `utf8_general_ci` collation for free-text and `utf8_bin` for identifiers. +We don't use the `enum` data type because each change to the list of possible +values requires altering the table (which is slow with big tables). We use +numbers (or short strings in some cases) mapped to PHP constants instead. + = JSON = Some data don't require structured access - you don't need to filter or order by