Fix NOT NULL definition

Correctly define dataset table. version belongs to the optional fields.
Datasets without a version caused an insert exception