Revert "Revert "roll back database creation, fixes #258""

This reverts commit 52c2f330f11163f8fb91498a600fce293dbe59ac.