Question

What is the difference between the usage of the install.sql file specified in extension manifest files on Joomla 1.5 and 1.6.

In 1.5, if you use method="upgrade" and the component is already installed, install.sql DOES get executed.

In 2.5, if you use method="upgrade" and the component is already installed, install.sql DOES NOT get executed.

Does anyone know if this change was intentional?

Was it helpful?

Solution

It is deliberate as from 1.6 up there is now a update tag for sql:

//executed when component is installed for the first time
<install folder="admin">
    <sql>
        <file driver="mysql" charset="utf8">sql/example.install.sql</file>
    </sql>
</install>


//executed when component is uninstalled
<uninstall folder="admin">
    <sql>
        <file driver="mysql" charset="utf8">sql/example.uninstall.sql</file>
    </sql>
</uninstall>


//executed when the component is installed over an existing version
//or updated through the Joomla Update Manager
<update>
        <schemas>
                <schemapath type="mysql">sql/updates/mysql</schemapath>
        </schemas>
</update>

See the Joomla 1.6 wikipage on the manifest.xml structure here for more information on this

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top