MysqlChangeItem
class MysqlChangeItem extends ChangeItem
Checks the database schema against one MySQL DDL query to see if it has been run.
Properties
string | $file | Update file: full path file name where query was found | from ChangeItem |
string | $updateQuery | Update query: query used to change the db schema (one line from the file) | from ChangeItem |
string | $checkQuery | Check query: query used to check the db schema | from ChangeItem |
string | $checkQueryExpected | Check query result: expected result of check query if database is up to date | from ChangeItem |
JDatabaseDriver | $db | \JDatabaseDriver object | from ChangeItem |
string | $queryType | Query type: To be used in building a language key for a message to tell user what was checked / changed Possible values: ADDTABLE, ADDCOLUMN, CHANGECOLUMNTYPE, ADD_INDEX | from ChangeItem |
array | $msgElements | Array with values for use in a \JText::sprintf statment indicating what was checked | from ChangeItem |
integer | $checkStatus | Checked status | from ChangeItem |
int | $rerunStatus | Rerun status | from ChangeItem |
Methods
__construct(
JDatabaseDriver $db,
string $file,
string $query)
Constructor: builds check query and message from $updateQuery
from ChangeItem
static
ChangeItem
getInstance(
JDatabaseDriver $db,
string $file,
string $query)
Returns a reference to the ChangeItem object.
from ChangeItem
boolean
check()
Runs the check query and checks that 1 row is returned If yes, return true, otherwise return false
from ChangeItem
Details
__construct(
JDatabaseDriver $db,
string $file,
string $query)
Constructor: builds check query and message from $updateQuery
static
ChangeItem
getInstance(
JDatabaseDriver $db,
string $file,
string $query)
Returns a reference to the ChangeItem object.