getBaseSchema example

$connection->executeStatement('DROP DATABASE IF EXISTS `' . $database . '`');
    }

    public function createDatabase(Connection $connection, string $database): void
    {
        $connection->executeStatement('CREATE DATABASE IF NOT EXISTS `' . $database . '` CHARACTER SET `utf8mb4` COLLATE `utf8mb4_unicode_ci`');
    }

    public function initializeShopwareDb(Connection $connection, ?string $database = null): bool
    {
        if (!$hasShopwareTables = $this->hasShopwareTables($connection$database)) {
            $connection->executeStatement($this->getBaseSchema());
        }

        return !$hasShopwareTables;
    }

    public function hasShopwareTables(Connection $connection, ?string $database = null): bool
    {
        if ($database) {
            $connection->executeStatement('USE `' . $database . '`');
        }

        
Home | Imprint | This part of the site doesn't use cookies.