I'm trying to install Sylius on Heroku. Here's what I do (taken from https://www.christophh.net/2013/10/19/sylius-on-heroku/):
composer create-project -s dev sylius/sylius-standard myAppName
heroku run php -d memory_limit=-1 app/console
sylius:install
During installation I am using db created in step 1, so I answer N
to
It appears that your database already exists. Would you like to reset it?
My installation crashes with:
[PHPCR\RepositoryException] Unexpected error talking to the backend: An exception occurred while executing 'SELECT 1 FROM phpcr_workspaces WHERE name = ?' with params ["default"] : SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "phpcr_workspaces" does not exist LINE 1: SELECT 1 FROM phpcr_workspaces WHERE name = $1
It seems that somewhere the script expects phpcr_workspaces
table to be present, but there is none. Does anyone have a clue?
I found the solution here: https://stackoverflow.com/a/35118943/6519983
Basically I need to initialize doctrine tables and workspace manually:
heroku run "php app/console doctrine:phpcr:init:dbal --force"
heroku run "php app/console doctrine:phpcr:workspace:create default"
heroku run "php app/console doctrine:phpcr:repository:init"
heroku run "php app/console -v -n doctrine:phpcr:fixtures:load"
Note: To continue with Sylius installation I also had to create Sylius tables as well:
php app/console doctrine:schema:update --force