Managing Component Updates with Joomla!2.5 - Part 2
(→updates) |
m |
||
| Line 7: | Line 7: | ||
* [[Managing_Component_Updates_with_Joomla!1.6_-_Part_4|Update SQL files]] | * [[Managing_Component_Updates_with_Joomla!1.6_-_Part_4|Update SQL files]] | ||
| − | == Manifest File ( | + | == Manifest File (democompupdate.xml) == |
The manifest file in this example is very similar to that of normal components. Important contents for this example include: | The manifest file in this example is very similar to that of normal components. Important contents for this example include: | ||
| Line 25: | Line 25: | ||
<source lang="xml"> | <source lang="xml"> | ||
| − | <name> | + | <name>COM_DEMOCOMPUPDATE</name> |
</source> | </source> | ||
Revision as of 11:24, 29 May 2011
Please note that the content on this page is currently incomplete. Please treat it as a work in progress.
- This article was last edited by Sm990 (talk| contribs) 23 months ago. (Purge)
Contents |
Articles in this series
Manifest File (democompupdate.xml)
The manifest file in this example is very similar to that of normal components. Important contents for this example include:
sql folder
Note the inclusion of the SQL folder in the administration files section. This tells Joomla to copy the contents of this folder to the web site during install or update. The SQL folder contains individual SQL files for each incremental update.
<administration> <files folder="admin"> <folder>sql</folder> </files> </administration>
name
This is the name of the component. The 'getParam($key)' method in the script.php file uses this value to identify the correct row in the extensions table. The manifest_cache field in the extensions table has the version string for the currently installed component.
<name>COM_DEMOCOMPUPDATE</name>
version
Joomla stores this value in the manifest_cache field of the extensions table. The extensions table is where the custom code in the script.php file reads the version string of the currently installed component, and compares it to the version string of the update. The custom component code uses this comparison to abort an update, if the version sequence is not allowed. Joomla also compares this string to the SQL update file names, to determine which SQL commands to execute.
<version>1.0</version>
updates
This defines the directory that contains SQL files for component incremental database updates. You may choose to put the SQL files somewhere else in your component release, but make sure their location is documented here.
<update> <schemas> <schemapath type="mysql">sql/updates</schemapath> </schemas> </update>