Revert "roll back database creation, fixes #258"

This reverts commit 24a57e2698a4ced6725c2d1055f0085a03659d84.