Auto-generated column != Primary key

Hi,


I have been experimenting a bit with “CREATE TABLE” Change type in LB 2.0.1, and I noticed that all auto-generated columns are automatically promoted to be primary keys (when I inspect the generated SQL). As a consequence it is breaking some use cases because resultant SQL is not precisely correct (i.e. as intended). I want to have two auto-incremented cols (some DB support it, e.g. H2) in a table – one primary key and the other a normal column.


Or am I missing something?


Regards,

Shantanu

Yes, we shouldn’t be making that assumption. Most databases require identity columns to be PKs, but we shouldn’t assume it. It will take change to the sql generator to solve it for you, for now you will probably need to use


I created http://liquibase.jira.com/browse/CORE-897 to track it


Nathan