0

私の人生でmagentoにSQLセットアップを実行させることはできません。以前は問題なくこれを実行しましたが、このアプリケーションには独自の理由があり、今は実行したくありません。これが私がこれまでやってきたことです。

アプリ/コード/ローカル/名前空間/モジュール/etc/config.xml

<config>
    <modules>
        <namespace_module>
            <version>0.0.1</version>
        </namespace_module>
    </modules>
    <global>
        <resources>
            <module_setup>
                <setup>
                    <module>Namespace_Module</module>
                    <class>Namespace_Module_Model_Resource_Setup</class>
                </setup>
            </module_setup>
        </resources>
    </global>
</config>

アプリ/コード/ローカル/名前空間/モジュール/モデル/リソース/Setup.php

<?php
class Namespace_Module_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup {


}

アプリ/コード/ローカル/名前空間/モジュール/sql/module_setup/mysql4-install-0.0.1.php

<?php
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition License
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magentocommerce.com/license/enterprise-edition
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    Mage
 * @package     Mage_Catalog
 * @copyright   Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license     http://www.magentocommerce.com/license/enterprise-edition
 */

$installer = $this;
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */

$installer->startSetup();

if (!$installer->tableExists($installer->getTable('namespace_module_table'))) {
    $installer->run("
    create table namespace_module_table (
        postal_code char(5) primary key,
        north_east_bound_lat varchar(64),
        north_east_bound_lng,
        namespace_module_address varchar(64),
        time_zone_id varchar(30)
    );
    ");
}

$installer->endSetup();

その結果、magento に私の Setup.php ファイルを認識させることができたのですが、一時的にエラーがスローされたため、それを修正しました。しかし、core_resources を確認すると、モジュールのセットアップが表示されません。

すべてのキャッシュを無効にして、magentos キャッシュとストレージ キャッシュをフラッシュします。私の無効化と有効化app/etc/modules/Namespace_Module.xml

このモジュールは完全に機能することに注意してください。私がしようとしているインストーラーがありません。これをインストールするための最低限のことを説明しました。

4

1 に答える 1