ChangeSet
class ChangeSet
Contains a set of JSchemaChange objects for a particular instance of Joomla.
Each of these objects contains a DDL query that should have been run against the database when this database was created or updated. This enables the Installation Manager to check that the current database schema is up to date.
Methods
Constructor: builds array of $changeItems by processing the .sql files in a folder.
Returns a reference to the ChangeSet object, only creating it if it doesn't already exist.
Checks the database and returns an array of any errors found.
Runs the update query to apply the change to the database
Returns an array of results for this set
Gets the current database schema, based on the highest version number.
Details
__construct(
JDatabaseDriver $db,
string $folder = null)
Constructor: builds array of $changeItems by processing the .sql files in a folder.
The folder for the Joomla core updates is administrator/components/com_admin/sql/updates/<database>
.
static
ChangeSet
getInstance(
JDatabaseDriver $db,
string $folder = null)
Returns a reference to the ChangeSet object, only creating it if it doesn't already exist.