Magento CLI 安装:在表“core_resource”中列“data_version”仍然为空,为什么?
我尝试通过 cli 安装 Magento 1.5.1。
据我所知,所有数据库表都是使用相关内容创建的,但在表core_resource
中,我可以看到来自sql目录的data_version
(mysql4-data-upgrade.. . 文件)丢失。在 core_resource
中的所有行中,data_version
列均为空。为什么?
根据此处的说明调用 CLI: http://www.magentocommerce.com/wiki/groups/227/command_line_installation_wizard
安装后的 Mage::app()->cleanCache();
没有帮助。
我可以通过登录后端系统/缓存管理并刷新 CacheType=CONFIGURATION 来解决此问题。但是如何通过 cli 做到这一点呢?
i try to install Magento 1.5.1 via cli.
As far as i can see all database tables are created with relevant content, but in table core_resource
i can see the data_version
comming from sql dir (mysql4-data-upgrade... files) is missing. At all rows in core_resource
the column data_version
is null. Why?
CLI is called according to the instructions here:
http://www.magentocommerce.com/wiki/groups/227/command_line_installation_wizard
A Mage::app()->cleanCache();
after installation do not help.
I can fix this by do a login to the backend SYSTEM / CACHE MANAGEMENT and refreshing of CacheType=CONFIGURATION. But how to do that via cli?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装程序从不调用 applyAllDataUpdates() 来完成安装。 Install.php 相信之前使用过 magento 下载器,它会调用 applyAllDataUpdates()。
但就我而言,我没有使用 magento 下载器,因为我通过我自己的 ant 脚本从本地 git 存储库(用于构建服务器、开发机器等)安装了 magento 实例。我猜测 cli 安装是独立于下载器的(按照设计) - 但这里发现了一个“隐藏”依赖项。单独运行 cli 安装程序,设置扩展而不升级“data_version”。
通常,您可以信任对magento前端/后端的第一个http调用,如果配置(在缓存中)有错误,它会调用applyAllDUpdates()和applyAllDataUpdates(),但在这种情况下,缓存已成功创建(扩展名配置)由安装程序 - 因此不会触发 applyAllDataUpdates() 。
在构建 magento 之后(不使用下载器),我正在运行单元测试、集成测试和功能测试(在该链中)。如果“data_version”没有被污染,我会得到奇怪的行为。我的解决方案是将:添加
到我的单元测试的引导程序中。
The installer never calles the applyAllDataUpdates() to make the installation complete. Install.php trusts that the magento downloader was used before, which does a call to applyAllDataUpdates().
But in my case i did not use the magento downloader, because i installed a magento instance from a local git repository (for buildserver, dev machine, etc.) via my own ant script. I gussed that the cli install is independend from the downloader (by design) - but here a "hidden" dependency is discovered. Running cli installer alone, setup the extensions without upgrading "data_version".
Normally you can trust in the first http call to the magento frontend / backend, which calls the applyAllDUpdates() and applyAllDataUpdates() if there is a error with the config (in cache), but in this case the cache was created successfull (extension config) by the installer - so no applyAllDataUpdates() is triggered.
I am running unit tests, integration tests and function tests (in that chain) after a build of magento (without using the downloader). I get strange behaviours if "data_version" is not poluted. My solution is to add:
to the bootstrap of my unit tests.