<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>Thanks, I'll look at your idea. As a very remote option, I don't think any of the data is critical yet, so I may be able to find a slow time and just uninstall the module and re-install it.</DIV>
<DIV>&nbsp;</DIV>
<DIV>And, no it doesn't need to run on Postgres, but I thought these new functions for 6.x were supposed to work with both.<BR>&nbsp;</DIV>
<P><FONT face="bookman old style, new york, times, serif" color=#ff007f size=4><EM><STRONG>Nancy</STRONG></EM></FONT></P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif"><BR>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Sascha Grossenbacher &lt;saschagros@gmail.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> development@drupal.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Fri, September 24, 2010 4:29:24 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [development] Adding auto-increment to an existing table<BR></FONT><BR>Hi<BR><BR>On Fri, Sep 24, 2010 at 10:02 PM, nan wich &lt;<A href="mailto:nan_wich@bellsouth.net" ymailto="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</A>&gt; wrote:<BR>&gt; user warning: Incorrect table definition; there can be only one auto column<BR>&gt; and it must be defined as a key query: update_sql /* admin : update_sql */<BR>&gt; ALTER TABLE client_activity ADD `id` INT auto_increment DEFAULT NULL in<BR>&gt; C:\www\webapps\drupal6\includes\database.mysql-common.inc on line 298.<BR><BR>Try using the $new_keys argument of db_change_field() to
 create the<BR>primary key at the same time. If that doesn't work either (possible if<BR>it does it in a separate query), then do not remove the primary key<BR>before making the field autoincrement.<BR><BR>Also, if you need to do that and this code needs to run on PostgreSQL<BR>too, then you need to make it conditional and only remove/re-add the<BR>key for PostgreSQL.<BR><BR>Sascha<BR></DIV></DIV></div></body></html>