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

Don't call gp_upgrade_data() in gp_upgrade_db() on install #361

Closed
3 tasks done
ocean90 opened this issue Mar 20, 2016 · 3 comments
Closed
3 tasks done

Don't call gp_upgrade_data() in gp_upgrade_db() on install #361

ocean90 opened this issue Mar 20, 2016 · 3 comments
Assignees
Labels
[Status] In Progress Tracking issues with work in progress
Milestone

Comments

@ocean90
Copy link
Member

ocean90 commented Mar 20, 2016

If gp_upgrade_db() runs for the first time gp_upgrade_data() gets called with false for the $db_version parameter, thus the query for $db_version < 190 runs.

  • Don't call gp_upgrade_data() if get_option( 'gp_db_version' ) returns false
  • Remove the unused global import for $wpdb; from gp_upgrade_db()
  • Remove the $db_version < 190 query since this will never run. The default version for all installs is 940.
@toolstack
Copy link
Contributor

It will run in the case of a first install (false=0) but of course there will be no data to upgrade in that case.

Since it's not used should we just remove the entire gp_upgrade_data() function and call?

@ocean90
Copy link
Member Author

ocean90 commented Mar 21, 2016

No need to remove it if we're going to use it sooner or later. For example for #293.

@ocean90 ocean90 added this to the Future milestone Mar 21, 2016
@toolstack
Copy link
Contributor

#293 won't need gp_upgrade_db() as it will probably just add columns to the database which will be handled by dbDelta().

@ocean90 ocean90 modified the milestones: Future, 2.1 Apr 1, 2016
@ocean90 ocean90 added the [Status] In Progress Tracking issues with work in progress label May 22, 2016
@ocean90 ocean90 self-assigned this May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

No branches or pull requests

2 participants