Hi all,
This pull request suggests to rewrite the serialization in the MigrationWriter to dedicated classes which are then used by a factory function. The reasoning behind this is to reduce the complexity of the current serialize() function (according to the reporter McCabe Cyclomatic Complexity of 50).
The benefit that comes with the new approach -- yet not implemented and would be part of a separate issue -- is a dynamic way to introduce new serialization options for data types the current MigrationWriter does not support. While neither Simon nor Marten nor I could think of any such case, we'd like to get other peoples input.
In case we don't come up with cases where the current MigrationWriter fails, the discussion should be made if the added overhead is worth it. While I find the new code easier to grasp if I'd see it the first time, I'm happy to stick to the current implementation.
Cheers,
/Markus