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:

HTML Code:
        <!-- Tables - `date` field has been added in version 2.0 -->
        <table name="items">
                <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 -->
        <menu id="1">
                <item url="showItems.php" lang="en">Items</item>
                <item url="showItems.php" lang="pl">Pozycje</item>
Maybe you know better solutions? I hope you will help me.