[CMS] Installing & Updating Extensions
I'm developing a new extensions management panel in my CMS.
Usually plugins provide install(), uninstall() and update() functions. However, there are some problematic issues:
- CMS supports more databases (MySQL & SQLite)
- How to inform about plugin's and/or CMS's version?
If plugins provide these functions, they will have to detect database engine, CMS version, its version and other information. It's a risk that they might do it incorrectly.
The basic question is: what should take care of integrity?
A. Plugins (their installers make all actions)
B. CMS (plugins only provide information about tables, menu, etc.)
In case of B - example:
Maybe you know better solutions? I hope you will help me.
<!-- Tables - `date` field has been added in version 2.0 -->
<field name="ID" auto="auto" type="int" />
<field name="title" default="Untitled Item" type="varchar" />
<field name="date" added="2.0" type="datetime" />
<!-- Menu block deleted in version 2.0 -->
<block name="A title" deleted="2.0" />
<!-- Menu -->
<item url="showItems.php" lang="en">Items</item>
<item url="showItems.php" lang="pl">Pozycje</item>