Part of my SQL definition (for hsqldb):
CREATE TABLE activities (
id BIGINT GENERATED BY DEFAULT AS IDENTITY,
group_id BIGINT NOT NULL
CONSTRAINT pk_activities PRIMARY KEY (id)
);
The scenario during and insert is:
idis auto generated / auto-incremented,group_idwhen specified (non-null) is set to the given value,group_idwhen not specified is set to the value ofidjust generated
I target postgresql and hsqldb (for tests).
Can this be done?