install.sql
我的站点模块文件夹中有以下文件/sql
。我从我的模块.xml
文件中引用它,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="2.5" client="site" method="install">
<name>bbb Referral</name>
<author>AAA Media</author>
<creationDate>23/02/2012</creationDate>
<copyright>Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later</license>
<authorEmail>info@AAA</authorEmail>
<authorUrl>AAA</authorUrl>
<version>1.0</version>
<description>bbb Referral</description>
<files>
<filename module="mod_bbb_referral">mod_bbb_referral.php</filename>
<folder>tmpl</folder>
<filename>index.html</filename>
<filename>mod_bbb_referral.xml</filename>
</files>
<install folder="site">
<sql>
<file driver="mysql" charset="utf8">sql/install.sql</file>
</sql>
</install>
<languages folder="language/en-GB">
<language tag="en-GB">en-GB.ini</language>
</languages>
<config>
<fields name="params">
<fieldset name="basic">
<field name="header_text" type="textarea" default="" label="Header text" description="Header text to show before friends list" />
<field name="footer_text" type="textarea" default="" label="Footer text" description="Footer text to show below friends list" />
<field name="body_text" type="textarea" default="" label="Body text"
description="Body text to include in referral" />
<field name="thankyou_text" type="textarea" default="" label="Thank you text"
description="Thank you text to show when successful" />
<field name="error_text" type="textarea" default="Error encountered. Please try again later." label="Error text"
description="Error text to show if share was not successful in any way." />
<field name="socialgraph_url" type="text" default="" size="60" label="Social Graph request URL"
description="URL to access when getting user's friend list, leave {filter}, {skip} and {count} in URL, they will be replaced upon run-time." />
<field name="socialgraph_filter" type="text" default="@Friends" label="Social Graph list filter"
description="Filter to use when getting list." />
<field name="socialgraph_page_count" type="text" default="" label="Friends per page" description="Default is 26, leave empty to use default" />
<field name="socialgraph_oauth_scope" type="text" default="graph/read" label="OAuth scope" description="Separated by a {space}. DO NOT CHANGE if you're unsure." />
</fieldset>
</fields>
</config>
</extension>
但它特别不执行包含在中的表的创建部分/sql
:
CREATE TABLE IF NOT EXISTS `#__oauth_api_log` (
`id` int(11) unsigned NOT NULL auto_increment,
`tracking_session_id` int(11) unsigned NOT NULL,
`type` char(20) default '',
`api_request` mediumtext,
`api_response` mediumtext,
`api_result` mediumtext,
`execution_time` float default '-1',
`date_time` timestamp NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
);
记录需要此表。
任何帮助/指针表示赞赏。