Edgewall Software

Changes between Version 4 and Version 5 of TracDev/ScratchPad/DataModels


Ignore:
Timestamp:
Sep 2, 2016, 9:57:05 PM (8 years ago)
Author:
Ryan J Ollos
Comment:

Grammar fix.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ScratchPad/DataModels

    v4 v5  
    99=== Standardize missing values
    1010
    11 For tickets, when a field is unset or set to an empty string the database value it set to `None` / `NULL` (#11018). When retrieving `NULL` values from the database, we get `None` in Python, and the empty string is returned from the model using the special value [apidoc:api/trac_util_text#trac.util.text.empty empty]. See e.g. what we do for  [source:trunk/trac/ticket/model.py@11111:127,137#L110 ticket fields]. The pattern could be extended to other model classes, and even the `Ticket` model should be reviewed to ensure that all fields follow the pattern.
     11For tickets, when a field is unset the database value is set to `None` / `NULL` (#11018). When retrieving `NULL` values from the database, we get `None` in Python, and the empty string is returned from the model using the special value [apidoc:api/trac_util_text#trac.util.text.empty empty]. See e.g. what we do for  [source:trunk/trac/ticket/model.py@11111:127,137#L110 ticket fields]. The pattern could be extended to other model classes, and even the `Ticket` model should be reviewed to ensure that all fields follow the pattern.
    1212
    1313=== `NOT NULL` columns