Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php app/console sylius:install error with database #2362

Closed
xrowkristina opened this issue Jan 20, 2015 · 4 comments
Closed

php app/console sylius:install error with database #2362

xrowkristina opened this issue Jan 20, 2015 · 4 comments

Comments

@xrowkristina
Copy link

During create the project you can set database name like sylius and during the installation (php app/console sylius:install) the database name changes to sylius_dev, but in the parameters.yml it is still sylius. I get this exeption:

[PHPCR\RepositoryException]
Error inside the transport layer: Unknown fetch type '196615'
[Doctrine\DBAL\Driver\Mysqli\MysqliException]
Unknown fetch type '196615'

If I choose sylius_dev at the creating the project the database name changes to sylius_dev_dev during the installation.

Best regards
Kristina

@madc
Copy link

madc commented Jan 21, 2015

The default Sylius configuration uses a different database for production and development. In your case, this would be sylius from prod and for the dev environment _dev is appended to the datbase name. This is expected behavior and not a bug.

You can find the configuration at the end of app/config/config_dev.yml. If you remove the following lines, both environments use the same database.

doctrine:
    dbal:
        dbname: %sylius.database.name%_dev

@xrowkristina
Copy link
Author

Dear madc,

thank you.

@kklecho
Copy link
Contributor

kklecho commented Sep 1, 2016

There are 2 assumptions you are taking :

  • people use root db account for installation
  • or people know about this behaviour from this very github thread / analizing config files.

If these are not met, the out of the box installation for new adopters fails frustrating.
The quick fix would be to add a note on to install guide.
The better one would be explicit parameter setup for _dev database on the install wizard.

@nicodemuz
Copy link

Ended up here for the same reason as above. A note on the installation guide would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants