[wp-trac] [WordPress Trac] #12832: Use the same data type for site statuses
WordPress Trac
noreply at wordpress.org
Sun Sep 15 00:41:40 UTC 2013
#12832: Use the same data type for site statuses
--------------------------------------+-----------------------
Reporter: ocean90 | Owner: database
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.7
Component: Database | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback |
--------------------------------------+-----------------------
Comment (by pento):
Replying to [comment:17 nacin]:
> We do, but I'm not sure if ENUM converts to an integer field as smoothly
as it does a varchar.
It doesn't. When an ENUM converts to an INT, it returns the ENUM index,
not the `CAST(... AS INT)` value of the ENUM. In the case of the
`archived` column, ENUM '0' has an index of 1, and ENUM '1' has an index
of 2.
We could totally convert it to VARCHAR in 3.7, then INT in 3.8, though.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12832#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list