Reputation: 407
The SQL install script install.mysql.utf8.sql
does not create the table.
My module manifest file is:
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="2.5.0" client="site" method="upgrade">
<name>Data Entry module</name>
<author>Md Masum</author>
<version>1.0.0</version>
<description>This is a data entry module. by this module we can store various data in our custom table into joomla database</description>
<files>
<filename>mod_entry.xml</filename>
<filename module="mod_entry">mod_entry.php</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<filename>tmpl/default.php</filename>
<filename>tmpl/index.html</filename>
<folder>sql</folder>
</files>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/mysql/install.mysql.utf8.sql</file>
<file driver="sqlazure" charset="utf8">sql/sqlazure/install.sqlazure.utf8.sql</file>
</sql>
</install>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">sql/mysql/uninstall.mysql.utf8.sql</file>
<file driver="sqlazure" charset="utf8">sql/sqlazure/uninstall.sqlazure.utf8.sql</file>
</sql>
</uninstall>
<update>
<schemas>
<schemapath type="mysql">sql/mysql/updates</schemapath>
<schemapath type="sqlazure">sql/sqlazure/updates</schemapath>
</schemas>
</update>
<config>
</config>
</extension>
SQL file (install.mysql.utf8.sql) contains:
CREATE TABLE IF NOT EXISTS `#__student_profile` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`roll` int(10) NOT NULL,
`class` int(2) NOT NULL,
`section` varchar(25) NOT NULL,
`subject` varchar(25) NOT NULL,
`father_name` varchar(25) NOT NULL,
`mother_name` varchar(25) NOT NULL,
`email` varchar(25) NOT NULL,
`address` varchar(50) NOT NULL,
`phone` int(14) NOT NULL,
`date_birth` date NOT NULL,
`date_addmission` date NOT NULL,
`religion` varchar(10) NOT NULL,
`gender` varchar(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
Upvotes: 0
Views: 1767
Reputation: 42562
I've managed to install your module without any issues.
My guess is that you already have the module installed. If the module is already registered with Joomla, when creating the install kit and installing it, it will detect that it's already installed and it will NOT install it again but it will just update it (using the SQL update statements). Which means that install.mysql.utf8.sql
will not get executed a second time.
Uninstall the module from Joomla and do a fresh reinstall, it should work.
Hope this helps.
Upvotes: 2