Open chrisknoll opened 3 months ago
Is required is not required - personally I would like to remove away from data models having required or not required fields. It adds complexity for the advantage of saving a few bytes. I'm also not sure any packages are currently using it and it is perfectly valid to have null fields within the database. We can review this prior to a 1.0.0 release
Ok, that's fair and as author of RMM your prerogative, but, it does raise the question about how to specify that a column should be NULL-able in the DDL when it calls generateSqlSchema.
Personally I dislike the use of this function (I think writing SQL is explicit, and we already have a translation layer to other languages) but it was added as a convenience because strategus modules need to upload results to something.
See: https://github.com/OHDSI/ResultModelManager/blob/ad706b4396d8285a8930c9b99ec09e927e403b00/R/DataModel.R#L774
isRequired (I'm assuming this defines nullable columns) is not a required field of the model spec. Should it be?