public function checkDbConfig() {
        if (!$this->dbConfig || !$this->db) {
            $dbConfigs = array_keys(get_class_vars('DATABASE_CONFIG'));

            $this->out('Available database configurations:');

            foreach ($dbConfigs as $i => $db) {
                $this->out(sprintf('[%s] <info>%s</info>', $i, $db));
            }

            $this->out();

            $answer = $this->in('Which database should the queries be executed in?', array_keys($dbConfigs));

            if (isset($dbConfigs[$answer])) {
                $this->setDbConfig($dbConfigs[$answer]);
            } else {
                $this->checkDbConfig();
            }
        }

        $this->out(sprintf('Database Config: <info>%s</info>', $this->dbConfig));

        $answer = strtoupper($this->in('Is this correct?', array('Y', 'N')));

        if ($answer === 'N') {
            $this->dbConfig = null;
            $this->checkDbConfig();
        }

        // Check that database is connected
        if (!$this->db->isConnected()) {
            $this->err(sprintf('<error>Database connection for %s failed</error>', $this->dbConfig));
            return false;
        }

        $this->out('<success>Database check successful, proceeding...</success>');
        return true;
    }