gpt4 book ai didi

php - Magento 设置资源 : Installer script not running

转载 作者:行者123 更新时间:2023-12-04 18:19:19 25 4
gpt4 key购买 nike

我正在开发 Magento 版本。 1.11.2.0(企业)。

我正在关注 Allan Storm 的帖子 here .

我的模块 config.xml :

<?xml version="1.0"?>
<config>
<modules>
<Invent_Instance>
<version>0.1</version>
</Invent_Instance>
</modules>
<global>
<models>
<instance>
<class>Invent_Instance_Model</class>
<resourceModel>instance_mysql4</resourceModel>
</instance>
<instance_mysql4>
<class>Invent_Instance_Model_Mysql4</class>
<entities>
<instance>
<table>instance</table>
</instance>
</entities>
</instance_mysql4>
</models>
<resources>
<instance_setup>
<setup>
<module>Invent_Instance</module>
<class>Invent_Instance_Model_Resource_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</instance_setup>
<instance_write>
<connection>
<use>core_write</use>
</connection>
</instance_write>
<instance_read>
<connection>
<use>core_read</use>
</connection>
</instance_read>
</resources>

...

Invent_Instance_Model_Resource_Mysql4_Setup 类在我创建它之前似乎被调用了,它给出了一个错误,说它不存在。

我的文件结构如下:

Module file structure

我的安装程序的内容是
echo 'Running This Upgrade: '.get_class($this)."\n <br /> \n";
die("Exit for now");

删除所有缓存后,我重新加载了我的管理模块,它加载时没有给出输出,或者显然没有运行这个脚本。

有人可以告诉我我做错了什么吗?我已经仔细检查了模块版本号(0.1)并且无法弄清楚它为什么不运行。

我的模块模型设置有什么问题吗?感谢您的帮助!

最佳答案

看着上面的一切似乎都很好。

值得检查 core_resource 表并在“code”列中查找 instance_setup,如果“value”列中的值与 config.xml 中的版本号匹配,则脚本将不会运行。

您始终可以删除此行以再次运行安装脚本。

关于php - Magento 设置资源 : Installer script not running,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10996199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com