[development] schema API add column after
mistknight at gmail.com
Mon Jun 9 20:40:59 UTC 2008
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?
On Mon, Jun 9, 2008 at 10:26 PM, Darrel O'Pry <darrel.opry at gmail.com> wrote:
> 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 at bellsouth.net>
>> Matej Svetlík wrote:
>> > why do you need to have table column at specified position?
>> I was trying to keep quiet, even though I have this same issue, but I
>> Think about a new installation as opposed to an updated ("add column")
>> In the new installation, my schema says the columns come in the order, a,
>> 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
>> 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
>> 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,
>> 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?
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 8.0.100 / Virus Database: 270.1.0/1492 - Release Date: 6/9/2008
>> 10:29 AM
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development