? Failure

User tests: Successful: Unsuccessful:

avatar wojsmol
wojsmol
26 Dec 2015

PR for issue #8786
Original issue description

IMHO file https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/mysql/3.4.0-2014-09-16.sql contains MySQL syntax errors :
is

ALTER TABLE `#__redirect_links` ADD header smallint(3) NOT NULL DEFAULT 301;
ALTER TABLE `#__redirect_links` MODIFY new_url varchar(255);

should be

ALTER TABLE `#__redirect_links` ADD `header` smallint(3) NOT NULL DEFAULT 301;
ALTER TABLE `#__redirect_links` MODIFY `new_url` varchar(255);

related: #6333

avatar wojsmol wojsmol - open - 26 Dec 2015
avatar wojsmol wojsmol - change - 26 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Dec 2015
Labels Added: ?
avatar wojsmol
wojsmol - comment - 26 Dec 2015

Travis returns errors, but from what I see they are not related to this PR.

avatar wojsmol
wojsmol - comment - 26 Dec 2015

Additionaly see #6333 (comment)

avatar Bakual
Bakual - comment - 26 Dec 2015

Did you get a MySQL error while updating from a version before 3.4.0? To my knowledge, the SQL commands work fine and apparently nobody had a problem since we released 3.4.0.

avatar ggppdk
ggppdk - comment - 26 Dec 2015

I had to run the query manually in the past

ALTER TABLE `#__redirect_links` ADD header smallint(3) NOT NULL DEFAULT 301;

About this fix,

  • i tested it has the same effect as fixing JSchemaChangeitemMysql to detect "ADD columnname" After changing the SQL file, the Database view (extension manager) reported the missing column, and Fix button worked

I manually deleted the header column from the redirect_links

Without Fix:
without_fix

With change in the SQL file, missing column is detected
missing_column_detected

and notice that now the reported DB changes are 80 instead of 79:
fix_button_worked

avatar wilsonge wilsonge - change - 26 Dec 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-12-26 20:34:57
Closed_By wilsonge
avatar wilsonge wilsonge - close - 26 Dec 2015
avatar wilsonge wilsonge - reference | 7848324 - 26 Dec 15
avatar wilsonge wilsonge - merge - 26 Dec 2015
avatar wilsonge wilsonge - close - 26 Dec 2015
avatar wilsonge
wilsonge - comment - 26 Dec 2015

Merged on review. Whilst not everyone seemed to hit this - the syntax in here is definitely more correct in terms of escaping the column names. And the column thing definitely is required for the schema here https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/schema/changeitem/mysql.php#L66

avatar wilsonge wilsonge - change - 26 Dec 2015
Milestone Added:
avatar wojsmol wojsmol - head_ref_deleted - 26 Dec 2015

Add a Comment

Login with GitHub to post a comment