当我安装或更新新组件时,我的 SQL 文件没有被执行。最初我觉得很奇怪我的同事需要将他的 SQL 文件直接执行到 PHPMyAdmin 中,但不是 Joomla!应该自动运行文件?
以下是我设置 XML 的方式:
ReforcoDigital.xml
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5.0" client="site" method="upgrade">
<name>Reforco Digital</name>
<author>Rodrigo Pereira</author>
<creationDate>14/05/2013</creationDate>
<copyright>Copyright</copyright>
<license>Licença</license>
<authorEmail>rodrigo-c-pereira@hotmail.com</authorEmail>
<authorUrl>http://www.site.com</authorUrl>
<version>0.1</version>
<description>Sistema de Reforço Digital</description>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<update>
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<files folder="site">
<folder>language</folder>
<folder>models</folder>
<folder>views</folder>
<filename>reforcodigital.php</filename>
<filename>controller.php</filename>
<filename>index.html</filename>
</files>
<administration>
<menu>Reforco Digital</menu>
<files folder="admin">
<folder>sql</folder>
<folder>views</folder>
<filename>controller.php</filename>
<filename>reforcodigital.php</filename>
<filename>index.html</filename>
</files>
</administration>
</extension>
文件夹admin/sql有install.mysql.utf8.sql文件,admin/sql/updates/mysql有文件0.1.sql;两者都有相同的 SQL 代码。我可能在这里错过了什么?