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.<br><br><div class="gmail_quote">On Mon, Jun 9, 2008 at 2:43 PM, Nancy Wichmann <<a href="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Matej Svetlík wrote:<br>
<br>
> why do you need to have table column at specified position?<br>
<br>
</div>I was trying to keep quiet, even though I have this same issue, but I can't<br>
now.<br>
<br>
Think about a new installation as opposed to an updated ("add column")<br>
installation.<br>
<br>
In the new installation, my schema says the columns come in the order, a, b,<br>
c, etc. but let's say we now want to add column d. For a new installation,<br>
it would look nicer to have it between b and c. The hook_schema can be done<br>
this way. But how does one tell MySql that we want it between b and c? In<br>
straight MySql, this is easy with the "AFTER COLUMN ..." cause.<br>
<br>
So, now you're going to ask, "What do you mean by 'it would look nicer'?"<br>
So I'll give you an example that I'm actually working on right now. I have a<br>
node extension table that has nid, vid, name, and more text fields. I am<br>
changing the name column from text to integer so that it can point to new<br>
table. I really prefer to keep integer columns (pointers) together. And, in<br>
this case, I am replacing one column with another (add new column, insert<br>
data, delete old column), so it would be nice to have the new column be in<br>
the "same place" the old one was before the update.<br>
<br>
Make sense?<br>
<br>
NancyDru<br>
<br><br>
No virus found in this outgoing message.<br>
Checked by AVG.<br>
Version: 8.0.100 / Virus Database: 270.1.0/1492 - Release Date: 6/9/2008 10:29 AM<br>
<br></blockquote></div><br>