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
fjarrett opened this issue Mar 29, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@fjarrett
Copy link
Contributor

commented Mar 29, 2014

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

This comment has been minimized.

Copy link

commented Apr 2, 2014

@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?

@fjarrett

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2014

@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.

@fjarrett

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2014

@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 closed this Apr 2, 2014

@c3mdigital c3mdigital reopened this Apr 2, 2014

@c3mdigital c3mdigital referenced this issue Apr 7, 2014

Merged

Issue 379 #387

@fjarrett

This comment has been minimized.

Copy link
Contributor Author

commented Apr 14, 2014

@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.

fjarrett referenced this issue Apr 16, 2014

Luke Carbis

lukecarbis pushed a commit that referenced this issue Apr 16, 2014

Luke Carbis
Remove update routine
This is now done in #379.

@fjarrett fjarrett closed this Apr 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.