It would be nice to patch it, but I'm sort of worried about upgrading to 6.x for the time being. I'm tempted to think the guidelines for the update hooks only apply to new update hooks and that users upgrading their installations must upgrade to the latest 5.x version of the module before upgrading to 6.x, is this accurate?
it would be nice if schema API handled this automatically based on index order in the schema array... That's what I would hope happens... If not maybe someone who wants this feature can write a patch for schema API.On Mon, Jun 9, 2008 at 2:43 PM, Nancy Wichmann <nan_wich@bellsouth.net> wrote:
No virus found in this outgoing message.Matej Svetlík wrote:I was trying to keep quiet, even though I have this same issue, but I can't
> why do you need to have table column at specified position?
now.
Think about a new installation as opposed to an updated ("add column")
installation.
In the new installation, my schema says the columns come in the order, a, b,
c, etc. but let's say we now want to add column d. For a new installation,
it would look nicer to have it between b and c. The hook_schema can be done
this way. But how does one tell MySql that we want it between b and c? In
straight MySql, this is easy with the "AFTER COLUMN ..." cause.
So, now you're going to ask, "What do you mean by 'it would look nicer'?"
So I'll give you an example that I'm actually working on right now. I have a
node extension table that has nid, vid, name, and more text fields. I am
changing the name column from text to integer so that it can point to new
table. I really prefer to keep integer columns (pointers) together. And, in
this case, I am replacing one column with another (add new column, insert
data, delete old column), so it would be nice to have the new column be in
the "same place" the old one was before the update.
Make sense?
NancyDru
Checked by AVG.
Version: 8.0.100 / Virus Database: 270.1.0/1492 - Release Date: 6/9/2008 10:29 AM