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

Save database on wp-env. #20648

Merged
merged 1 commit into from
Mar 6, 2020
Merged

Save database on wp-env. #20648

merged 1 commit into from
Mar 6, 2020

Conversation

torounit
Copy link
Member

@torounit torounit commented Mar 5, 2020

closes #20657

Description

wp-env does not save the database now.
Each time run wp-env start , the database is emptied and WordPress is newly installed.
should reset the database only when run wp-env clean .

How has this been tested?

  1. $ ./packages/env/bin/wp-env start
  2. add post.
  3. $./packages/env/bin/wp-env stop
  4. $ ./packages/env/bin/wp-env start and check your WordPress.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@youknowriad youknowriad added [Tool] Env /packages/env [Type] Build Tooling Issues or PRs related to build tooling labels Mar 5, 2020
Copy link
Member

@noahtallen noahtallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

✅ I verified that before, nothing would be persisted between runs.
✅ With this PR applied, the database persists (as does the session, which is very nice)

:shipit:

@noahtallen
Copy link
Member

I might try a rebase to get the tests passing. (I don't have the right permissions to merge with failing checks :))

@talldan
Copy link
Contributor

talldan commented Mar 6, 2020

I've restarted the failing jobs. 🤞

@talldan talldan merged commit 842f4b0 into WordPress:master Mar 6, 2020
@github-actions github-actions bot added this to the Gutenberg 7.7 milestone Mar 6, 2020
@torounit torounit deleted the add/env-save-mysql-on-stop branch March 6, 2020 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] Env /packages/env [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wp-env stop seems to delete all data.
4 participants