Homec4science

Use binary collations for most text

Authored by epriestley <git@epriestley.com> on Oct 1 2014, 17:18.

Description

Use binary collations for most text

Summary:
Ref T1191. For most text columns, we either don't care if "a" and "A" are the same, or we expect them to be different (for example: keys, domains, secrets, etc). Default text columns to the _bin collation so they are compared by strict character value. This is safer in cases where we aren't sure.

For some text columns, we allow the user to sort by the column in the UI (like Maniphest task titles) or we do care that "A" and "a" are the same (for example: project names). Introduce a new class of virtual data types, the "sort..." types, to cover these columns. These are like the "text..." types but use sorting collations which treat "A" and "a" the same.

Test Plan:

  • Made an effort to identify all columns where the UI relies on database collation.
  • Ran bin/storage adjust and cleared all warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: beng, epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10602

Details

Committed
epriestley <git@epriestley.com>Oct 1 2014, 17:18
Pushed
aubortJan 31 2017, 17:16
Parents
rPH4fcc634a99dc: Fix almost all remaining schemata issues
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1dfa94e57127: Use binary collations for most text (authored by epriestley <git@epriestley.com>).Oct 1 2014, 17:18