I have created a module, but now i need to create a table in db. this is the content of the Mynamespace/Mymodule/sql/mynamespace_mymodule_setup/mysql4-install-0.1.0.php:

/* @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
echo 1; exit();
$table = $installer->getConnection()
    ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
        'identity'  => true,
        'unsigned'  => true,
        'nullable'  => false,
        'primary'   => true,
        ), 'Id')
    ->addColumn('check', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
        'nullable'  => false,
        ), 'Check')


this is the content of the config.xml file:


As you see I put an exit in after $installer. It never goes there. Something is wrong with my xml file. Can you help me with this ? thx


if there is a record in core_resource with the column core = 'mynamespace_mymodule_setup' the installer scripts won't run again. Delete that record and clear the cache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.