0
votes

I am building a Joomla package with a component, multiple modules and a plugin.

My question is, where should I place the install.sql and uninstall.sql files, relative to the package root? Right now they are at root/com_mypackage/administrator/sql/install.mysql.utf8.sql and they are defined in the component's manifest as:

<install><!-- Runs on install -->
    <sql>
      <file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
    </sql>
</install>

However, this doesn't seem right to me. Should I include administrator before the path in the <file> tag?

Of course, the component itself will be packed in its own .zip, to be included in the Package's XML install file.

1

1 Answers

1
votes

No there is no need to this tag in administrator tag. you missing some in manifest.xml for fully doc try:-

http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_an_install-uninstall-update_script_file

http://docs.joomla.org/Components:xml_installfile

on my end manifest.xml (my .sql in admin/install/install.mysql.utf8):-

<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5" method="upgrade">
    <name>Social</name>
    <license>Open Source License, GPL v2 based</license>
    <author>me</author>
    <authorEmail>[email protected]</authorEmail>
    <authorUrl>http://www.me.com</authorUrl>
    <creationDate>2012-01-01</creationDate>
    <copyright>2013, me</copyright>
    <version>1.1</version>
    <description></description>

    <!-- Installation -->   

    <install>
        <sql>
            <file driver="mysql" charset="utf8">install/install.mysql.utf8.sql</file>
        </sql>
    </install>
    <installfile>install/install.php</installfile>
    <uninstall>
        <sql>
            <file driver="mysql" charset="utf8">install/uninstall.mysql.utf8.sql</file>
        </sql>
    </uninstall>
    <uninstallfile>install/uninstall.php</uninstallfile>

and rest of