Fix migration error for changing storage engine