Closed this issue 3 years ago · 2 comments
The constraint we created to verify that a patient is at least 15 years old does not work when adding to Postgres.
Current constraint: CHECK(CAST(DATEDIFF(DD, date_of_birth, GETDATE())/365.25 AS INT) >= 15)
CHECK(CAST(DATEDIFF(DD, date_of_birth, GETDATE())/365.25 AS INT) >= 15)
Fixed this in the recent commit
Inserting this into the table will not work. I tested it on onecompiler and pgadmin.