Consecutive Database.create() calls can render a database unopenable
Currently, if you run
Database.create() twice on the same database, the second call will create entries in
_indexes/ which correspond to another
id index. However, while the call will fail, those entries will remain.
If you correct your code to correctly call
open will still throw
IndexConflict('Already exists'). The only way to remedy this is to figure out which file in
_indexes/ to remove.
The correct behavior, in my opinion, is that
Database.create() should not leave the database in an unopenable state.