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

Add spryker refresh command #668

Merged
merged 3 commits into from
Mar 7, 2022
Merged

Conversation

michaeltrestianu18
Copy link
Contributor

No description provided.

Comment on lines 243 to 254
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
Copy link

@hgajjar hgajjar Feb 18, 2022

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.

@hgajjar hgajjar merged commit e6245b9 into 1.3.x Mar 7, 2022
@hgajjar hgajjar deleted the feature/spryker-refresh-command branch March 7, 2022 04:55
@andytson-inviqa andytson-inviqa added the enhancement New feature or request label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request harness-spryker Spryker harness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants