Good question, and one with some rather major implications in the study of the Roman economy. It is first important to note that it was never total and it happened at different times in different places. There were, for example, plenty of amphora around the Mediterranean during the Middle Ages, even though the barrel is the "iconic" form of storage, likewise, the Celts had been using barrels for centuries before the Roman conquest. The barrel became a "competitor" to the amphora, and perhaps even the dominant form of transport, starting sometime in the early imperial period, perhaps in the second century, and they were certainly common by Late Antiquity.
The problem is that we have no way of producing a quantified comparison. Literary evidence is unhelpful, as it rarely mentions things like shipping containers (to give an idea, when was the last time you talked about shipping crates?). Archaeology, on the other hand, is biased towards what survives in the material record, and in this case amphora survive considerably better that wooden barrels, which can only do so in specific conditions.
So broadly speaking barrels became a common for of transport during the early imperial period, particularly in the wood rich northern provinces. Zeroing in on this is a complex and likely intractable problem.
Andrew Wilson covers this in his chapter on trade in Quantifying the Roman Economy.
What I think you want to ask is if one type of storage was preferred at one point in time and then people's preference changed for some reason. Just keep in mind that pottery and wooden barrels were both used by both the Romans and medieval peoples.
/u/Tiako has got you covered for Roman stuff, but here are some resources for you to look at for the medieval period.
Medieval Pottery Research Group -- go to links.
Medieval pottery in Britain, AD 900-1600 by Michael McCarthy; Catherine Brooks (Leicester Univ. Press, 1994)
"Processing, storage, distribution of food : food in the Medieval rural environment" by Jan Klápště; P Sommer (Brepols, 2011)
Beer in the Middle Ages and the Renaissance. by Richard W Unger (UPenn Press, 2004)
A companion to food in the ancient world by John Wilkins; Robin Nadeau (Oxford, 2015)
Hope this helps a little. Happy Reading!
Bonus Medieval Poop
It may be that when you are thinking about Roman times, you are thinking about the Mediterranean region, while when you are thinking about medieval times, you are thinking about North-West Europe? These kinds perceptions are likely influenced not only by actual knowledge, but by popular culture who may be perpetuating false or more easily recognisable information.
Whatever the case, I can tell you one thing about Barrel technology: For most of their history they had to be made in oak wood, because oak swells from moisture and makes the barrels stay water proof. However around the Enlightenment (17th or 18th C.) they figured out that you could use Zinc to make other kinds of wood water proof in barrels. This must have led to a lot more barrels being made, as oak is, and especially was, expensive and and useful, especially for ships.
I learnt this working at the Hanseatic Museum in Norway. I've been trying to google for sources and more information, but having no luck. My English may be too poor.
Inquiry: Has there been any discovered correlation between shipwright design and barrel production?
(Say in a further known time period, the construction of ships and their designs accelerated the availability of shaped and processed wood, which resulted in an increased production of wooden barrels?)