See the many many messages about issues with libraries stored on cloud storage. As has been said many times before, if you store your library on a storage system using a network connection, it's not a question of if you will have library issues, it's a question of when.
I would suggest copying your library back from OneDrive to your computer. Then try repairing the library. If that fails, you can try creating a new library and then adding the books from your old library to your new library.
Good luck!
In the calibre FAQs, see:
I am getting errors with my calibre library on a networked drive/NAS?.
From SQLite's web site, see:
SQLite Over a Network, Caveats and Considerations.