set autocommit to on before migration; rollback transaction on error before writing version