Yet another attempt at conditional database creation