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
388: Fix project path during upgrade #410
Conversation
Also add associated doc blocks and formatting updates.
} | ||
|
||
if ( $db_version < 950 ) { | ||
$wpdb->query( "UPDATE {$wpdb->gp_projects} SET `path`=SUBSTR(`path`, 1, LENGTH(`path`) - 1) WHERE `path` LIKE '%/';" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be CHAR_LENGTH()
and let's use SUBSTRING()
. Some whitespace before/after the equal sign would be nice too.
@@ -27,7 +27,7 @@ | |||
*/ | |||
|
|||
define( 'GP_VERSION', '2.1.0-alpha' ); | |||
define( 'GP_DB_VERSION', '940' ); | |||
define( 'GP_DB_VERSION', '950' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
940 was a SVN revision, should we change the version to a date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered where the number came from.
Either just an incrementing number (I chose ten, but any increment would do) or date.
Date is kind of ugly and does limit us to once change a day 😉.
Resolves #388.