what is the resource type to use in an upgrade script to do as explained here Multiple setup types in same module but for the newsletter subscriber table
i've tried
$installer = Mage::getModel('newsletter/resource_subscriber', 'newsletter_setup');
and doesn't work. What i'm doing wrong or missing?
UPDATE:
the code i've used is:
{$installer = $this; $installer->startSetup(); $conn = $installer->getConnection(); $subscriberTable = $installer->getTable('newsletter/subscriber'); $conn->addColumn($subscriberTable, 'rjm_utm_source', array( 'type' => 'varchar', 'default' => '', 'nullable' => true, 'comment' => '__utmz::utmcsr'));}
the error i've received is: Invalid column definition
this because doesn't accept as type 'varchar'. the acceptable type are:
protected $_ddlColumnTypes = array(
Varien_Db_Ddl_Table::TYPE_BOOLEAN => 'bool',
Varien_Db_Ddl_Table::TYPE_SMALLINT => 'smallint',
Varien_Db_Ddl_Table::TYPE_INTEGER => 'int',
Varien_Db_Ddl_Table::TYPE_BIGINT => 'bigint',
Varien_Db_Ddl_Table::TYPE_FLOAT => 'float',
Varien_Db_Ddl_Table::TYPE_DECIMAL => 'decimal',
Varien_Db_Ddl_Table::TYPE_NUMERIC => 'decimal',
Varien_Db_Ddl_Table::TYPE_DATE => 'date',
Varien_Db_Ddl_Table::TYPE_TIMESTAMP => 'timestamp',
Varien_Db_Ddl_Table::TYPE_DATETIME => 'datetime',
Varien_Db_Ddl_Table::TYPE_TEXT => 'text',
Varien_Db_Ddl_Table::TYPE_BLOB => 'blob',
Varien_Db_Ddl_Table::TYPE_VARBINARY => 'blob'
);
and varchar is deprecated :
// Deprecated column types, support is left only in MySQL adapter.
const TYPE_TINYINT = 'tinyint'; // Internally converted to TYPE_SMALLINT
const TYPE_CHAR = 'char'; // Internally converted to TYPE_TEXT
const TYPE_VARCHAR = 'varchar'; // Internally converted to TYPE_TEXT
const TYPE_LONGVARCHAR = 'longvarchar'; // Internally converted to TYPE_TEXT
const TYPE_CLOB = 'cblob'; // Internally converted to TYPE_TEXT
const TYPE_DOUBLE = 'double'; // Internally converted to TYPE_FLOAT
const TYPE_REAL = 'real'; // Internally converted to TYPE_FLOAT
const TYPE_TIME = 'time'; // Internally converted to TYPE_TIMESTAMP
const TYPE_BINARY = 'binary'; // Internally converted to TYPE_BLOB
const TYPE_LONGVARBINARY = 'longvarbinary'; // Internally converted to TYPE_BLOB