Back to Joomla project (class list)

Class MysqlChangeItem - list of methods

Checks the database schema against one MySQL DDL query to see if it has been run.

Extends

Package: Joomla\CMS\Schema\ChangeItem
Copyright: (C) 2011 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Schema/ChangeItem/MysqlChangeItem.php
Project: Joomla

Method Summary

protected void
()

Checks a DDL query to see if it is a known type If yes, build a check query to see if the DDL has been run on the database.
Returns
  • void
Since
  • 2.5
Show source code of this method: buildCheckQuery Source Code

private string
(mixed $type1, mixed $type2)

Fix up integer. Fixes problem with MySQL integer descriptions.
Parameters
  • string $type1 the column type
  • string $type2 the column attributes
Returns
  • string The original or changed column type.
Since
  • 2.5
Show source code of this method: fixInteger Source Code

private string
(mixed $string)

Fixes up a string for inclusion in a query.
Parameters
  • string $string The input string to be cleaned up.
Returns
  • string The modified string.
Since
  • 2.5
Show source code of this method: fixQuote Source Code

private string
(mixed $type)

Make check query for column changes/modifications tolerant for automatic type changes of text columns, e.g. from TEXT to MEDIUMTEXT, after conversion from utf8 to utf8mb4, and fix integer columns without display length for MySQL 8 (see also function "fixInteger" above).
Parameters
  • string $type The column type found in the update query
Returns
  • string The condition for type check in the check query
Since
  • 3.5
Show source code of this method: fixUtf8mb4TypeChecks Source Code

private string
(mixed $changesArray)

Create query clause for column changes/modifications for NULL attribute
Parameters
  • array $changesArray The array of words after COLUMN name
Returns
  • string The query clause for NULL check in the check query
Since
  • 3.8.6
Show source code of this method: checkNull Source Code

private string
(mixed $changesArray, mixed $type)

Create query clause for column changes/modifications for DEFAULT attribute
Parameters
  • array $changesArray The array of words after COLUMN name
  • string $type The type of the COLUMN
Returns
  • string The query clause for DEFAULT check in the check query
Since
  • 3.8.6
Show source code of this method: checkDefault Source Code

Tags Summary

Since
2.5