小编Mes*_*aza的帖子

magento在现有表中添加列

我是Magento的新手.我想在添加列newsletter_subscriber的表,所以我做了一个新的文件mysql4-upgrade-1.6.0.0-1.6.0.1.phpapp/code/core/mage/newsletter_setup/

<?php
$installer = $this;
$installer->startSetup();
$installer->getConnection()->addColumn(
    $this->getTable('newsletter/subscriber'), //table name 
    'groupid',                                //column name
    'varchar(100) NOT NULL'                   //datatype definition
);

$installer->endSetup();

?>
Run Code Online (Sandbox Code Playgroud)

我更新了配置文件:

<modules>
    <Mage_Newsletter>
        <version>1.6.0.0</version> 
    </Mage_Newsletter>
</modules>
Run Code Online (Sandbox Code Playgroud)

它不起作用,请指导我做错了什么

php magento

2
推荐指数
1
解决办法
5406
查看次数

标签 统计

magento ×1

php ×1