I want to create a simple module for joomla, that on install will have and install.sql
so I have this xml file:
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2.0" method="upgrade">
<name>Address Api</name>
<!-- The following elements are optional and free of formatting constraints -->
<creationDate>August 2015</creationDate>
<author>Tzook Bar Noy</author>
<authorEmail>tbarnoy@xxxxxx.co.il</authorEmail>
<authorUrl>http://www.xxxx.com</authorUrl>
<copyright>Copyright Info</copyright>
<license>License Info</license>
<!-- The version string is recorded in the components table -->
<version>0.0.1</version>
<!-- The description is optional and defaults to the name -->
<description>Description of the Hello World component ...</description>
<files>
<filename>addressapi.php</filename>
<filename>ApiCall.php</filename>
<filename>controller.php</filename>
<filename>addressapi.xml</filename>
<folder>site</folder>
<folder>admin</folder>
</files>
<install> <!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall> <!-- Runs on uninstall -->
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<update> <!-- Runs on update; New since J2.5 -->
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<administration>
<!-- Administration Main File Copy Section -->
<!-- Note the folder attribute: This attribute describes the folder
to copy FROM in the package to install therefore files copied
in this section are copied from /admin/ in the package -->
</administration>
</extension>
but when I do the install threw extensions. I get this error:
JInstaller: :Install: SQL File not found /web/joom/administrator/components/com_addressapi/sql/install.mysql.utf8.sql
so my question is, why it is looking for the sql file inside the administrator/complonents folder, instead of the normal components??
my folders and files structure:
com_addressapi
admin
models
index.html
sql
update
index.html
install.mysql.utf8.sql
uninstall.mysql.utf8.sql
tables
index.html
addressapi.php
index.html
site
addressapi.php
index.html
addressapi.xml
addressapi.php
ApiCall.php
controller.php