Another attempt at conditional database creation