print dbUpdateDefinition

A definition class contains updates for a specific database. Each update must be unique, the same update will not be applied multiple times. For each database to be updated a file needs to be created in /data/dbUpdates using the name of the database to be updated as you would access it via the system::getConfig()->getDatabase() method.

This file should contain ONE and ONLY one class named dbUpdateMyDatabase.


Methods

public __construct([$inDbName = null])

Returns a new instance of dbUpdateDefinition

public load()

Loads a record from the database based on the primary key or first unique index

public loadFromArray($inArray)

Loads a record by array

public save()

Saves object to the table

public delete()

Deletes the object from the table

public reset()

Resets object properties to defaults

public update($inCommit, $inHaltOnError, $inReport)

Applies the set of updates to the current database, creates a log of any update applied

public toString([$newLine = ' '])

Returns object as a string with each property separated by $newLine

public toXml([$newLine = ' '])

Returns object as XML with each property separated by $newLine

public toArray()

Returns properties of object as an array

public isValid([$message = ''])

Returns true if object is valid

protected checkDbName([$inMessage = ''])

Checks that $_DbName has a valid value

protected checkVersion([$inMessage = ''])

Checks that $_Version has a valid value

protected checkLastUpdateID([$inMessage = ''])

Checks that $_LastUpdateID has a valid value

protected checkCreateDate([$inMessage = ''])

Checks that $_CreateDate has a valid value

protected checkUpdateDate([$inMessage = ''])

Checks that $_UpdateDate has a valid value

public isModified()

Returns true if object has been modified

public setModified([$status = true])

Set the status of the object if it has been changed

public getPrimaryKey()

Returns the primaryKey index

public getDbName()

Return value of $_DbName

public setDbName($inDbName)

Set $_DbName to DbName

public getVersion()

Return value of $_Version

public setVersion($inVersion)

Set $_Version to Version

public getLastUpdateID()

Return value of $_LastUpdateID

public getLastUpdateLogEntry()

Returns the last log entry for this database update

public setLastUpdateID($inLastUpdateID)

Set $_LastUpdateID to LastUpdateID

public getCreateDate()

Return value of $_CreateDate

public setCreateDate($inCreateDate)

Set $_CreateDate to CreateDate

public getUpdateDate()

Return value of $_UpdateDate

public setUpdateDate($inUpdateDate)

Set $_UpdateDate to UpdateDate

public abstract initialiseUpdates()

Sets up the updates to be applied to this database

public isUpToDate()

Returns true if there are no updates to apply

public getUpdateCount()

Returns the number of updates that need to be applied

public addUpdate($inUpdate)

Adds a new update to the set

public getUpdate($inKey)

Gets the next update by key

public removeUpdate($inUpdate)

Removes an update from the set

public getCount()

Returns the number of updates in the set


Inherited Methods

<  1  >