Closed eskatos closed 11 years ago
The SQL snippet shown above would be the standard one.
Here are the PostgreSQL and MySQL ones :
// Standard SQL:
"my_pk_column BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY"
// PostgreSQL:
"my_pk_column BIGSERIAL PRIMARY KEY"
// MySQL
"my_pk_column BIGINT AUTO_INCREMENT PRIMARY KEY"
Hi Paul, Yes, there is no way to do so in current version. I will start working on implementing this right now and will post here when it's done or something weird happens. :)
I've pushed the changes made for this issue. Unfortunately, I am yet unable to upload the new snapshot to Maven repository. Report any problems here if you have them, I will test more and upload snapshot to Maven repository later this week, hopefully.
Edit: Check out DefinitionFactory for new method which accepts auto generation policy for ColumnDefinition. The primary key specification is still done via different way - by applying UniqueConstraint to TableDefinition.
Stan,
Tested and approved!
We need a release now :-)
Released version 0.3. with auto-generated column support.
Hi Stan,
I would like to create table columns with the following definition:
I did not found any way to do so in current version, tell me if I'm wrong.
/Paul