Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Need a way to reset locally stored data #438

Closed
jkleinsc opened this issue Apr 29, 2016 · 4 comments
Closed

Need a way to reset locally stored data #438

jkleinsc opened this issue Apr 29, 2016 · 4 comments
Labels
🚀enhancement an issue/pull request that adds a feature to the application help wanted indicates that an issue is open for contributions wontfix indicates an issue/pull request will not be worked on

Comments

@jkleinsc
Copy link
Member

Expected behavior:
If there was a need to reset the data at the server level, any data stored locally (offline) in user's browsers would need to be invalidated/flushed from the local pouchdb storage
Actual behavior:
If the couchdb database is deleted and recreated as an empty database, user's offline data ends up repopulating the data because of the sync between pouch and couch
Steps to reproduce:

  1. A user navigates to a hospitalrun site that has records in it.
  2. A couchdb admin deletes the main database and creates a new (empty) main database.
  3. The user from Unable to start ember #1 navigates to the hospitalrun site which causes the pouch/couch sync to run which in turn pushes the locally stored records back to couch, thus repopulating the database that was intentionally emptied.
    Screenshots (if applicable):
    N/A
    OS and Browser:
    All
@jkleinsc jkleinsc changed the title Need a way to invalidate locally stored data Need a way to reset locally stored data May 2, 2016
@jkleinsc
Copy link
Member Author

jkleinsc commented May 2, 2016

The solution here is to write a script that issues deletes for all the records in the database vs deleting the database and recreating the database as new.

The problem with this is that you cannot then reload the same data dump, because the load DB function in the app does a replication. Load DB should be changed to instead of doing replication it should load the records in the dump as new records/revs.

@tangollama tangollama added 🚀enhancement an issue/pull request that adds a feature to the application help wanted indicates that an issue is open for contributions Testing labels May 10, 2016
@darrylpargeter
Copy link
Contributor

@tangollama would it be possible to give this a try?

@tangollama
Copy link
Member

tangollama commented Oct 19, 2017 via email

@stale
Copy link

stale bot commented Aug 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix indicates an issue/pull request will not be worked on label Aug 7, 2019
@fox1t fox1t closed this as completed Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚀enhancement an issue/pull request that adds a feature to the application help wanted indicates that an issue is open for contributions wontfix indicates an issue/pull request will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants