On Sep 24, 2013, at 5:42 PM, Ken Lareau <[email protected]> wrote:

> On Tue, Sep 24, 2013 at 11:10 AM, Ken Lareau <[email protected]> wrote:
> 
> On Tue, Sep 24, 2013 at 10:32 AM, Michael Bayer <[email protected]> 
> wrote:
> 
> On Sep 24, 2013, at 12:00 PM, Ken Lareau <[email protected]> wrote:
> 
> >
> >
> >
> > Of course, this leads back to the original question... how exactly
> > does one accomplish this? :)  Hopefully the clarification above helps
> > some in determining this.
> 
> as I said, build a trigger:
> 
> http://dev.mysql.com/doc/refman/5.0/en/triggers.html
> 
> 
> 
> Oh, you meant on the database side... d'oh.  *slaps hand to forehead*
> Thanks, will look at this.
> 
> Sadly after over an hour of fighting with MySQL triggers and being
> unsuccessful at getting any variation to work, I've decided that I'm
> just going to need to shut down key infrastructure pieces during
> the column renaming and avoid the temporary new column as it
> would just complicate my current codebase more than it already
> is... once again, I do appreciate the help, however.

I googled for "mysql trigger copy autoincrement" and got this:

"Copy auto-increment value to another column on insert":

http://forums.mysql.com/read.php?99,186171,186241#msg-186241

the trigger here makes use of LAST_INSERT_ID() and is worth a shot.


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to