Why would you want to make a superkey to primarykey?
> Compound PK was supported on MSSQL
> (original db) and Postgres (current db).
This is supported by H2 as well. That's not the problem. The problem
is you have used the keyword "identity" which for H2 means this column
is automatically the primary key, as documented:
http://h2database.com/html/grammar.html#column_definition
What you actually want is "auto-increment":
CREATE TABLE agreement4 (
agreementid bigint auto_increment not null,
agreementtypeid int4 NOT NULL,
version VARCHAR(6) NOT NULL,
companyid int4 NOT NULL,
userid int4 NOT NULL,
date TIMESTAMP NOT NULL,
CONSTRAINT PK_AGREEMENT4 PRIMARY KEY (agreementid, agreementtypeid, version))
This works.
Regards,
Thomas