1

I am trying to install order_delivery_date-0.1.5 extension on magento 1.8. The extension was compatible with magento 1.7. now in magento 1.8 every thing seems to be ok, but the database part. the delivery date section can be seen in front end and back-end. but the extension didn't make any change on the database. as you can see the mysql4-install-0.1.0.php below, should add a new table to the database and 4 new attribute to existing tables:

<?php
$installer = $this;

$installer->startSetup();

$installer->run("

-- DROP TABLE IF EXISTS {$this->getTable('deliverydate')};
CREATE TABLE {$this->getTable('deliverydate')} (
  `deliverydate_id` int(11) unsigned NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `filename` varchar(255) NOT NULL default '',
  `content` text NOT NULL default '',
  `status` smallint(6) NOT NULL default '0',
  `created_time` datetime NULL,
  `update_time` datetime NULL,
  PRIMARY KEY (`deliverydate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    ");

$this->_conn->addColumn($this->getTable('sales_flat_quote'), 'shipping_arrival_date', 'datetime');
$this->_conn->addColumn($this->getTable('sales_flat_quote'), 'shipping_arrival_comments', 'text');
$this->_conn->addColumn($this->getTable('sales_flat_order'), 'shipping_arrival_date', 'datetime');
$this->_conn->addColumn($this->getTable('sales_flat_order'), 'shipping_arrival_comments', 'text');

$installer->endSetup(); 

so, i am wondering that, what is the problem? why the mysql4-install-0.1.0.php does not do any change on the database? how can i do this changes manually?

  • Did you clear the config cache? – Fabian Blechschmidt Dec 10 '13 at 16:22
  • configuration cache is disable. all the cache is disabled and cleaned. – mir.moezi Dec 10 '13 at 16:38
  • > how can i do this changes manually? You can add the fields manually using sql, but it is not good practise at all. I would try replace $this->_conn with $installer->getConnection() and delete the entry from the core_resource table to re run – jzahedieh Dec 10 '13 at 17:15
1

If you migrated from a 1.7 database to a 1.8 database, with the extension previous being installed on the 1.7 instance, you may need check the core_resource table.

The core_resource table in the Magento database stores a list of the resources installed (aka your setup file) and the version attached to it.

Look in core_resource for your plugin under the code column. If it exists there already with the current version you have installed, Magento already thinks it has been installed and will not run the installer.

First, backup your database completely, then try removing the plugin's row record from the core_resource table. After it's deleted, reload the admin dashboard and it should run the installer. Make sure your caches are disabled or flushed after you delete the record.

  • yes . it worked – mir.moezi Dec 11 '13 at 13:37

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.