[wp-trac] Re: [WordPress Trac] #4189: Taxonomy Schema and API

WordPress Trac wp-trac at lists.automattic.com
Thu May 3 15:06:45 GMT 2007


#4189: Taxonomy Schema and API
-------------------------------------------+--------------------------------
 Reporter:  ryan                           |        Owner:  anonymous
     Type:  defect                         |       Status:  new      
 Priority:  normal                         |    Milestone:  2.3      
Component:  General                        |      Version:  2.2      
 Severity:  normal                         |   Resolution:           
 Keywords:  term taxonomy tags categories  |  
-------------------------------------------+--------------------------------
Comment (by jhodgdon):

 Replying to [comment:7 majelbstoat]:

 > The slug and term_name being different sizes is a typo.  Personally, I
 would prefer shorter fields as multilingual plugins are used by a minority
 of users, and having size 200 is pretty inefficient for the vast majority
 of people.  I would certainly by -1 for a text field.  Plugins that need
 to extend the size of a field can do so easily by making an ALTER TABLE
 statement when they are activated.


 I agree that multilingual blogs are the minority, but how much storage
 space are we really talking? 145 extra bytes per term is not very much,
 and I don't think the WP database is really optimized for space anyway.

 Also, your suggestion of ALTER TABLE in the plugin will not work. What you
 have to do as a plugin author is either distribute a hacked version of
 upgrade_schema.php or tell the plugin user to edit it themselves, and then
 remember to re-edit every time they upgrade WP, and BEFORE running the
 upgrade script. That is because when the user upgrades to a new version of
 WP, the database schema update will "helpfully" set the fields back to the
 original field widths, thereby dropping the painstakingly entered extra
 characters that were stored under the altered table structure. It's not
 pretty.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4189#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list