-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add spryker refresh command #668
Conversation
src/spryker/harness.yml
Outdated
passthru vendor/bin/console transfer:generate | ||
passthru vendor/bin/console propel:install -o | ||
passthru vendor/bin/console propel:database:drop | ||
passthru vendor/bin/console propel:database:create | ||
passthru vendor/bin/console propel:pg-sql-compat | ||
passthru vendor/bin/console propel:migrate | ||
passthru vendor/bin/console setup:init-db | ||
passthru vendor/bin/console data:import | ||
passthru vendor/bin/console cache:empty-all | ||
passthru vendor/bin/console cache:class-resolver:build | ||
passthru vendor/bin/console transfer:entity:generate | ||
passthru vendor/bin/console rest-api:build-request-validation-cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this would be much useful, as normally Spryker requires a lot many other things to reset the database and reinstall it. For ex, there is queue sync commands which syncs the data from postgres to redis/es which is missing here.
I would suggest to use the workspace's wrapper commands to achieve this. The following commands should be enough
passthru "ws exec vendor/bin/console propel:database:drop"
passthru "ws exec vendor/bin/console propel:database:create"
passthru "ws exec app install"
the app install
command runs everything you need to reinstall Spryker after recreating the db.
However, if the project is using kafka-outbox service, you would also need to restart the outbox container to let it create the outbox table after recreating postgres db (passthru "docker-compose restart outbox-relay"
), tho we have a separate ws app reinstall
command available at project level for this purpose.
No description provided.