? Pending

User tests: Successful: Unsuccessful:

avatar wojsmol
wojsmol
19 Aug 2017

#Pull Request for Issue # .

Summary of Changes

Fixed syntax in 3.8.0-2017-07-28.sql update files for mysql and postgresql to be detected by Joomla schema checker on update.

Testing Instructions

  1. Install latest staging on mysql or postgresql
  2. Go to database fixer and remember number of checked database changes.(in my case 146)
  3. Apply PR.
  4. Go to database fixer and check number of checked database changes should be one more then in point 2 (in my case 147).
    or code review

Expected result

147 database changes were checked.

Actual result

146 database changes were checked.

Documentation Changes Required

N/A

cc @alikon @csthomas @twister65 for postgresql testing

avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2017
Category SQL Administration com_admin Postgresql
avatar wojsmol wojsmol - open - 19 Aug 2017
avatar wojsmol wojsmol - change - 19 Aug 2017
Status New Pending
avatar wojsmol wojsmol - change - 19 Aug 2017
The description was changed
avatar wojsmol wojsmol - edited - 19 Aug 2017
avatar wojsmol wojsmol - change - 19 Aug 2017
The description was changed
avatar wojsmol wojsmol - edited - 19 Aug 2017
avatar wojsmol wojsmol - change - 19 Aug 2017
The description was changed
avatar wojsmol wojsmol - edited - 19 Aug 2017
avatar twister65
twister65 - comment - 20 Aug 2017

ADD COLUMN is only for postgreSQL:
ALTER TABLE "#__fields_groups" ADD COLUMN "params" TEXT NOT NULL;

For mySQL, it's only ADD :
ALTER TABLE '#__fields_groups' ADD 'params' TEXT NOT NULL AFTER 'ordering';

avatar wojsmol
wojsmol - comment - 20 Aug 2017

@twister65 For MySQL ADD and ADD COLUMN are both valid but only ADD COLUMN is recognised by Joomla schema manager see

if ($command === 'ALTER TABLE')
{
$alterCommand = strtoupper($wordArray[3] . ' ' . $wordArray[4]);
if ($alterCommand === 'ADD COLUMN')
{
$result = 'SHOW COLUMNS IN ' . $wordArray[2] . ' WHERE field = ' . $this->fixQuote($wordArray[5]);
$this->queryType = 'ADD_COLUMN';
$this->msgElements = array($this->fixQuote($wordArray[2]), $this->fixQuote($wordArray[5]));
}

avatar wojsmol
wojsmol - comment - 20 Aug 2017

pinging @mbabker

avatar mbabker mbabker - change - 20 Aug 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-20 18:13:06
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 20 Aug 2017
avatar mbabker mbabker - merge - 20 Aug 2017

Add a Comment

Login with GitHub to post a comment