Closed shreeve closed 5 years ago
Hi Steve,
thank your very much. Would you mind adding some tests?
I'll add some tests and documentation to this. Hopefully, these few tweaks allow a much more fluid way to do migrations.
Check was showing as failing, but I closed and re-opened this PR to force Travis to re-run, and it succeeded. Hrm...
I'll work on specific tests now for this PR.
@PhilWaldmann - I've added two test files, but am not quite sure how to get them to run properly. Could you take a quick look?
I‘m currenlty on the go, but I‘ll check your tests in the evening.
Thanks, Philipp
One way would be to query the database and check the database types.
But a nicer solution would be to add the additional length information to the field (see attributes.js
The postgres driver currently reads the length information and adds a validatesLengthOf
validation. Something the mysql and sqlite driver are not doing. This should be unified anyways.
Do you need further assistance with this PR?
This is needed to be able to pass params such as the length of a varchar column. Otherwise, the defaults of varchar(255), etc. will always be used.