Allow TRUNCATE for MySQL
Resolves issue https://github.com/golang-migrate/migrate/issues/864 which originates from https://github.com/golang-migrate/migrate/pull/656.
I agree that proper isolation is a must, but my database forces safe updates, which the current DELETE-query does not adhere to. To resolve that, I've added a simple switch to choose between DELETE and TRUNCATE.
Not sure if this is the best solution (we could also wrap the DELETE with SET SQL_SAFE_UPDATES), so feel free to edit/comment/etc.
coverage: 59.281% (+0.06%) from 59.226% when pulling 55c859def8d64175ce6913da0317bae234a53e1c on ping-localhost:added-safe-update-to-mysql-driver into a5dc5d1efc69e65f4f4c8f7c76c96a80da71a68a on golang-migrate:master.
CI lint failure is not due to my changes, but because master itself is not compliant.
Could this be solved by adding a LIMIT clause to the delete instead of moving back to truncate which is not transactional?
Closing this in favor of https://github.com/golang-migrate/migrate/pull/1070