What do you mean by "nuked", did OneDrive delete it? It shouldn't delete unless it was deleted in the cloud by someone (or you).
I should mention that I was able to repeat the corrupting problem reliably. The problem disappeared when I moved to a working directory that was not monitored by OneDrive.
I was setting up a very simple db from a few CSV files, for use in a data science exercise for a course. There was nothing interesting happening in my code at all-- maybe a simple table join sql query, at most.