openreferral / specification

The Human Services Data Specification - a data exchange format developed by the Open Referral Initiative
https://openreferral.org
Other
117 stars 49 forks source link

datapackage.json - organization - year_incorporated not using format correctly? #263

Closed odscjames closed 9 months ago

odscjames commented 2 years ago
"type": "date",
"format": "%Y",

https://www.w3.org/TR/tabular-data-model/#formats-for-dates-and-times lists formats that implementers must manage. Crucially, they are all complete formats - ie all components are represented. There is no support for having a year only.

This has created problems in the MySQL database schema building - in tries to make a "date" column, and you can't put a year only in a mysql date column.

I suspect it would create other problems in validators that use this directly too.

Should it just be an integer, with some rought min & max constraints?

(Found when doing https://github.com/openreferral/specification/pull/261 )

odscjames commented 2 years ago

This can be fixed in the mysql schema with

sed -i 's/\Wyear\_incorporated\W date/year\_incorporated INTEGER/'  database/database_mysql.sql
mrshll1001 commented 9 months ago

This was changed to number in HSDS 3.0