Opened 17 years ago
Closed 17 years ago
#4778 closed defect (bug) (fixed)
Change enums to varchar
Reported by: | ryan | Owned by: | |
---|---|---|---|
Milestone: | 2.5 | Priority: | high |
Severity: | normal | Version: | 2.3 |
Component: | Administration | Keywords: | schema enum db early |
Focuses: | Cc: |
Description
Drop enums from the schema in favor of the more portable and flexible varchar. I think we can just change all occurrences of enum in schema.php to varchar(20). This will allow plugins to add new post status values, for example, without having to do an alter table to change the enum.
Attachments (1)
Change History (10)
#2
@
17 years ago
-1
This is a really bad idea. The whole point of using an enum is to have a fixed set of values that are valid ones. They are stored as integers internally and make things somewhat speedier, since WordPress selects posts based on post_status more or less constantly. Changing it to a varchar would create a not-insignificant performance loss.
If a plugin is making such a radical change as to require its own special post_status values, then it should be able to take the time to alter the table to allow that status.
+1
This is a really good idea.