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

Create a separate API for handling DB update routines #379

Closed
frankiejarrett opened this issue Mar 29, 2014 · 4 comments · Fixed by #387
Closed

Create a separate API for handling DB update routines #379

frankiejarrett opened this issue Mar 29, 2014 · 4 comments · Fixed by #387

Comments

@frankiejarrett
Copy link
Contributor

Our current method for dealing with DB update routines is starting to get a little messy, and some migration routines that require Connectors already be registered are needing their own method outside of the main update() method just to be able to fire at the correct time.

Furthermore, we should be asking users to opt-in to these updates, rather than just automatically doing it on reactivation. This is always a good idea just so admins know when their DB is being altered. This step is even more critical for very large sites, so a snapshot can be taken beforehand.

To remedy this, we should create a separate API specifically for handling DB update routines and prompt users to take action when updates are required. Once the update is performed, or if there are no routines to run, then the stream_db option can be updated.

UPDATE REQUIRED MESSAGE
screen shot 2014-03-29 at 2 21 14 am

SUCCESS MESSAGE
screen shot 2014-03-29 at 2 23 42 am

@c3mdigital
Copy link

@fjarrett It might be beyond the scope of this issue but what about having a export / import settings routine? This would just be a json dump of all the wp_stream array in options. Also is there a way for the user to remove all traces of stream from the database?

@frankiejarrett
Copy link
Contributor Author

@c3mdigital Yeah that's a cool idea. And definitely should be a separate issue as this pertains only to routines we need to do after plugin updates.

@frankiejarrett
Copy link
Contributor Author

@c3mdigital And yes, you can completely uninstall Stream including it's tables and all its options in the DB. That was done in #102 and #114.

@c3mdigital c3mdigital reopened this Apr 2, 2014
@c3mdigital c3mdigital mentioned this issue Apr 7, 2014
@frankiejarrett
Copy link
Contributor Author

@c3mdigital I'm getting an error when attempting to update the DB.

There was an error updating the Stream database. Please try again.

Based on our convo last week, I think this is because it's looking for an option named wp_stream_db instead of stream_db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants