« Return to Thread: [G3/Pg] Some news

Re: [G3/Pg] Some news

by Bharat Mediratta :: Rate this Message:

Reply to Author | View in Thread


It's not as trivial as renaming a few columns.  I spent about 30 minutes
on this and here's what's involved:

1) Getting rid of backticks (as Romain points out, this is a
consequence, but they still have to get removed for portability)

2) Rename the following columns (at least):
      $db->query("ALTER TABLE {items} CHANGE `left` left_ptr int(9) NOT
NULL");
      $db->query("ALTER TABLE {items} CHANGE `right` right_ptr int(9)
NOT NULL");
      $db->query("ALTER TABLE {vars} CHANGE `value` data text");

(missing the key columns from the *_translations tables)

3) Update all uses of left, right, key, value, etc to match.  This is a
pain, but it's doable and our tests probably cover us here.

So far so good.  I did all of the above.  We have installer code that
can deal with the column renaming, etc.  But the next hurdle is that the
upgrader runs as a controller, and we load the vars table before we run
controllers, and we're changing out one of the column names in the vars
table (from "value" to "data") which causes the precaching of the vars
table to fail.  Can't load vars, can't get anything off the ground.

Can we work around this?  Yes.  But honestly, I'm just not willing to
put any more time into this.  MySQL is plenty for me, and for enough of
our userbase that I'm not willing to prioritize it above any of the
other 100+ tickets we have open for beta 2 currently.

-Bharat

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
__[ g a l l e r y - d e v e l ]_________________________

[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]

 « Return to Thread: [G3/Pg] Some news