Hi all, I'd like to know how can I set a field to auto increment in migrate scripts. In mysql, it's auto_increment, and in postgresql, it's serial. How can I make a migrate script which works in both places? TIA, Vamsee.
on 2006-02-28 00:21
on 2006-02-28 00:26
Sorry, I forgot to tell you that I want auto increment for a field other than the primary key (id).
on 2006-02-28 17:50
Vamsee wrote: > Sorry, I forgot to tell you that I want auto increment for a field > other than the primary key (id). > mysql> create table test ( a int auto_increment primary key, b int unique auto_increment ); ERROR 1075: Incorrect table definition; There can only be one auto column and it must be defined as a key MySQL doesn't seem able.