Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

psr.phar install failed after database creation when you change the config .psh.yaml.dist #170

Open
BlackScorp opened this issue Oct 8, 2021 · 0 comments

Comments

@BlackScorp
Copy link

PHP Version

7.4.20

Shopware Version

6.4.5.1

Expected behaviour

when you call php psr.phar install CREATE DATABASE should be executed

Actual behaviour

when you call php psr.phar install CREATE DABASE fail because database is unknown

How to reproduce

  1. Clone shopware/development

  2. call "ddev config"

  3. call "ddev start"

  4. change your database entries in .psh.yaml.dist
    const:
    DB_USER: "root"
    DB_PASSWORD: "root"
    DB_HOST: "db"
    DB_PORT: "3306"
    DB_NAME: "db"
    APP_URL: "https://shopware-dev.ddev.site"

  5. call php psr.phar install on your container

What i assume here. config creates
DATABASE_URL=mysql://root:root@db:3306/db

then DROP DATABASE is called and after this the DATABASE_URL is not valid anymore for the CREATE DATABASE part you need to ignore the databasename in the connection. otherwise PDO crashes.

i assume you added there some hard links for default values

@BlackScorp BlackScorp changed the title psr.phar install failed after database when you change the config .psh.yaml.dist psr.phar install failed after database creation when you change the config .psh.yaml.dist Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant