planarnetwork / dtd2mysql

MySQL / MariaDB import for DTD feeds (fares, timetable and routeing)
30 stars 10 forks source link

RGK MODE_CODE incorrectly specified as not nullable? #9

Closed eoghanmurray closed 7 years ago

eoghanmurray commented 7 years ago

I'm getting an error with an import of the test Routeing download file RJRG0281.RGK

The third line of data contains the following: 00003,D,I,SRA,N,, with an empty 5th position in the CSV record. From the feed spec (RSPS5047) this seems valid as the ENTRY_TYPE is I; ("The Mode Code must be specified where Entry Type is ‘L’ or ‘N’.")

Should false for nullable be changed to true here: https://github.com/open-track/dtd2mysql/blob/master/config/routeing/file/RGK.ts#L24 ?

I can create a pull request unless there's something I'm missing.

eoghanmurray commented 7 years ago

Pull request if it's just a simple case of setting it to be nullable (that worked for me): https://github.com/open-track/dtd2mysql/pull/10

linusnorton commented 7 years ago

Thanks for the PR, it's merged now