Why did upgrading to 4.8.7 lose my database?

I have been using BC 4.7 for some time, and decided to upgrade to 4.8.7, and subsequently (without using 4.8.7) to 4.8.8

I keep my database on Dropbox, so that it is accessible to all my devices. When I upgraded, my folders, lists and items reverted to a much earlier version of the database, missing most of my later additions. I went to my laptop, with its WiFi off, and the database there was fairly recent, though not completely up-to-date. After some attempts to restore in various ways, I eventually used Time Machine to revert to BC 4.7 and all is now well: my folders, lists and items are again complete. However, I don't feel I want to upgrade. 

I don't understand how the upgrade could have somehow found an earlier version of the database: the name of the database was unchanged.

This was how 4.8.8 saw the database:

This was how the laptop (4.7) saw apparently the same database:

And this is how BOTH devices now see the -- correct -- database:

The location of the database in Preferences was unchanged.

Any ideas?