Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 3
1.5.1.0 to 1.6 error: mysql4-upgrade-1.5.9.9-1.6.0.0.php
 
janus03
Jr. Member
 
Total Posts:  9
Joined:  2009-07-14
Aarhus, Denmark
 

Drop and recreate the report_compared_product_index and report_viewed_product_index tables before upgradering. Fixed it for me!

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- 
Table structure for table `report_compared_product_index`
--

DROP TABLE IF EXISTS `report_compared_product_index`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `report_compared_product_index` (
  `
index_idbigint(20unsigned NOT NULL AUTO_INCREMENT,
  `
visitor_idint(10unsigned DEFAULT NULL,
  `
customer_idint(10unsigned DEFAULT NULL,
  `
product_idint(10unsigned NOT NULL,
  `
store_idsmallint(5unsigned DEFAULT NULL,
  `
added_atdatetime NOT NULL,
  
PRIMARY KEY (`index_id`),
  
UNIQUE KEY `UNQ_BY_VISITOR` (`visitor_id`,`product_id`),
  
UNIQUE KEY `UNQ_BY_CUSTOMER` (`customer_id`,`product_id`),
  
KEY `IDX_STORE` (`store_id`),
  
KEY `IDX_SORT_ADDED_AT` (`added_at`),
  
KEY `product_id` (`product_id`),
  
CONSTRAINT `FK_REPORT_COMPARED_PRODUCT_INDEX_CUSTOMERFOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  
CONSTRAINT `FK_REPORT_COMPARED_PRODUCT_INDEX_PRODUCTFOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  
CONSTRAINT `FK_REPORT_COMPARED_PRODUCT_INDEX_STOREFOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
ENGINE=InnoDB AUTO_INCREMENT=DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 
Table structure for table `report_viewed_product_index`
--

DROP TABLE IF EXISTS `report_viewed_product_index`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `report_viewed_product_index` (
  `
index_idbigint(20unsigned NOT NULL AUTO_INCREMENT,
  `
visitor_idint(10unsigned DEFAULT NULL,
  `
customer_idint(10unsigned DEFAULT NULL,
  `
product_idint(10unsigned NOT NULL,
  `
store_idsmallint(5unsigned DEFAULT NULL,
  `
added_atdatetime NOT NULL,
  
PRIMARY KEY (`index_id`),
  
UNIQUE KEY `UNQ_BY_VISITOR` (`visitor_id`,`product_id`),
  
UNIQUE KEY `UNQ_BY_CUSTOMER` (`customer_id`,`product_id`),
  
KEY `IDX_STORE` (`store_id`),
  
KEY `IDX_SORT_ADDED_AT` (`added_at`),
  
KEY `product_id` (`product_id`),
  
CONSTRAINT `FK_REPORT_VIEWED_PRODUCT_INDEX_CUSTOMERFOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  
CONSTRAINT `FK_REPORT_VIEWED_PRODUCT_INDEX_PRODUCTFOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  
CONSTRAINT `FK_REPORT_VIEWED_PRODUCT_INDEX_STOREFOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
ENGINE=InnoDB AUTO_INCREMENT=1348756 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

Edit: Please note that the above structure is taken from a 1.5.1 database.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Hopefully the new release of Magento 1.6.1 will solve these problems

http://www.magentocommerce.com/download

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Just tested upgrading to 1.6.1.0 via SSH.

a:5:{i:0;s:294:"Error in file: "/chroot/home/site/domain.com/html/staging/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[HY000]: General error: 1025 Error on rename of './site_test/#sql-18f2_2ed866' to './site_test/mg_sales_flat_order_item' (errno: 150)";i:1;s:1172:"#0 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.25', '1.6.0.4')
#2 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.25', '1.6.0.4')
#3 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/App.php(338): Mage_Core_Model_App->_initModules()
#6 /chroot/home/site/domain.com/html/staging/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /chroot/home/site/domain.com/html/staging/index.php(80): Mage::run('', 'store')
#8 {main}"
;s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
 
Magento Community Magento Community
Magento Community
Magento Community
 
j0ney3
Jr. Member
 
Total Posts:  25
Joined:  2010-02-24
 
Brent W Peterson - 19 October 2011 09:42 AM

Hopefully the new release of Magento 1.6.1 will solve these problems

http://www.magentocommerce.com/download

Not so much unfortunately Brent!  Upgrading from 1.6.0 -> 1.6.1 gave me a fatal front and back:

Fatal error: Class 'Mage_XmlConnect_Model_Resource_Setup' not found in includes/src/Mage_Core_Model_Resource_Setup.php on line 234

Tried removing sessions, cache, locks, etc.  I also tried uploading code\core\Mage\Core\ and app/code/core/Mage/XmlConnect hoping that a file went missing, but no such luck

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

@j0ney3:: Did you upgrade via ssh or connect?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Sorry, answered very quickly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
j0ney3
Jr. Member
 
Total Posts:  25
Joined:  2010-02-24
 
Brent W Peterson - 20 October 2011 04:34 AM

@j0ney3:: Did you upgrade via ssh or connect?

I did the upgrade via connect.  It completed with no errors.  I was able to get the site operational (thankfully just a dev box) by putting an insanely lame snip in includes/src/Mage_Core_Model_Resource_Setup.php, where it basically skips the check on that class (I know, but it was blocking our theming development).

 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

Did you mind post your table (mg_sales_flat_order_item)’s definition? such as primary key? index? foreign keys?

tradiArt - 19 October 2011 10:11 AM

Just tested upgrading to 1.6.1.0 via SSH.

a:5:{i:0;s:294:"Error in file: "/chroot/home/site/domain.com/html/staging/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[HY000]: General error: 1025 Error on rename of './site_test/#sql-18f2_2ed866' to './site_test/mg_sales_flat_order_item' (errno: 150)";i:1;s:1172:"#0 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.25', '1.6.0.4')
#2 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.25', '1.6.0.4')
#3 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /chroot/home/site/domain.com/html/staging/app/code/core/Mage/Core/Model/App.php(338): Mage_Core_Model_App->_initModules()
#6 /chroot/home/site/domain.com/html/staging/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /chroot/home/site/domain.com/html/staging/index.php(80): Mage::run('', 'store')
#8 {main}"
;s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 
hankzh - 20 October 2011 06:09 AM

Did you mind post your table (mg_sales_flat_order_item)’s definition? such as primary key? index? foreign keys?

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- 
Database: `ddbb_test`
--

-- --------------------------------------------------------

--
-- 
Estructura de tabla para la tabla `mg_sales_flat_order_item`
--

CREATE TABLE IF NOT EXISTS `mg_sales_flat_order_item` (
  `
item_idint(10unsigned NOT NULL auto_increment,
  `
order_idint(10unsigned NOT NULL default '0',
  `
parent_item_idint(10unsigned default NULL,
  `
quote_item_idint(10unsigned default NULL,
  `
store_idsmallint(5unsigned default NULL,
  `
created_atdatetime NOT NULL default '0000-00-00 00:00:00',
  `
updated_atdatetime NOT NULL default '0000-00-00 00:00:00',
  `
product_idint(10unsigned default NULL,
  `
product_typevarchar(255) default NULL,
  `
product_optionstext,
  `
weightdecimal(12,4) default '0.0000',
  `
is_virtualtinyint(1unsigned default NULL,
  `
skuvarchar(255NOT NULL default '',
  `
namevarchar(255) default NULL,
  `
descriptiontext,
  `
applied_rule_idstext,
  `
additional_datatext,
  `
free_shippingtinyint(1unsigned NOT NULL default '0',
  `
is_qty_decimaltinyint(1unsigned default NULL,
  `
no_discounttinyint(1unsigned default '0',
  `
qty_backordereddecimal(12,4) default '0.0000',
  `
qty_canceleddecimal(12,4) default '0.0000',
  `
qty_invoiceddecimal(12,4) default '0.0000',
  `
qty_ordereddecimal(12,4) default '0.0000',
  `
qty_refundeddecimal(12,4) default '0.0000',
  `
qty_shippeddecimal(12,4) default '0.0000',
  `
base_costdecimal(12,4) default '0.0000',
  `
pricedecimal(12,4NOT NULL default '0.0000',
  `
base_pricedecimal(12,4NOT NULL default '0.0000',
  `
original_pricedecimal(12,4) default NULL,
  `
base_original_pricedecimal(12,4) default NULL,
  `
tax_percentdecimal(12,4) default '0.0000',
  `
tax_amountdecimal(12,4) default '0.0000',
  `
base_tax_amountdecimal(12,4) default '0.0000',
  `
tax_invoiceddecimal(12,4) default '0.0000',
  `
base_tax_invoiceddecimal(12,4) default '0.0000',
  `
discount_percentdecimal(12,4) default '0.0000',
  `
discount_amountdecimal(12,4) default '0.0000',
  `
base_discount_amountdecimal(12,4) default '0.0000',
  `
discount_invoiceddecimal(12,4) default '0.0000',
  `
base_discount_invoiceddecimal(12,4) default '0.0000',
  `
amount_refundeddecimal(12,4) default '0.0000',
  `
base_amount_refundeddecimal(12,4) default '0.0000',
  `
row_totaldecimal(12,4NOT NULL default '0.0000',
  `
base_row_totaldecimal(12,4NOT NULL default '0.0000',
  `
row_invoiceddecimal(12,4NOT NULL default '0.0000',
  `
base_row_invoiceddecimal(12,4NOT NULL default '0.0000',
  `
row_weightdecimal(12,4) default '0.0000',
  `
gift_message_idint(10) default NULL,
  `
gift_message_availableint(10) default NULL,
  `
base_tax_before_discountdecimal(12,4) default NULL,
  `
tax_before_discountdecimal(12,4) default NULL,
  `
weee_tax_appliedtext,
  `
weee_tax_applied_amountdecimal(12,4) default NULL,
  `
weee_tax_applied_row_amountdecimal(12,4) default NULL,
  `
base_weee_tax_applied_amountdecimal(12,4) default NULL,
  `
base_weee_tax_applied_row_amountdecimal(12,4) default NULL,
  `
weee_tax_dispositiondecimal(12,4) default NULL,
  `
weee_tax_row_dispositiondecimal(12,4) default NULL,
  `
base_weee_tax_dispositiondecimal(12,4) default NULL,
  `
base_weee_tax_row_dispositiondecimal(12,4) default NULL,
  `
ext_order_item_idvarchar(255) default NULL,
  `
locked_do_invoiceint(10unsigned default NULL,
  `
locked_do_shipint(10unsigned default NULL,
  `
price_incl_taxdecimal(12,4) default NULL,
  `
base_price_incl_taxdecimal(12,4) default NULL,
  `
row_total_incl_taxdecimal(12,4) default NULL,
  `
base_row_total_incl_taxdecimal(12,4) default NULL,
  `
hidden_tax_amountdecimal(12,4) default NULL,
  `
base_hidden_tax_amountdecimal(12,4) default NULL,
  `
hidden_tax_invoiceddecimal(12,4) default NULL,
  `
base_hidden_tax_invoiceddecimal(12,4) default NULL,
  `
hidden_tax_refundeddecimal(12,4) default NULL,
  `
base_hidden_tax_refundeddecimal(12,4) default NULL,
  `
is_nominalint(11NOT NULL default '0',
  `
tax_canceleddecimal(12,4) default NULL,
  `
hidden_tax_canceleddecimal(12,4) default NULL,
  `
tax_refundeddecimal(12,4) default NULL,
  
PRIMARY KEY  (`item_id`),
  
KEY `IDX_STORE_ID` (`store_id`),
  
KEY `IDX_PRODUCT_ID` (`product_id`)
ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5320 ;

--
-- 
Filtros para las tablas descargadas (dump)
--

--
-- 
Filtros para la tabla `mg_sales_flat_order_item`
--
ALTER TABLE `mg_sales_flat_order_item`
  
ADD CONSTRAINT `FK_SALES_ORDER_ITEM_STOREFOREIGN KEY (`store_id`) REFERENCES `mg_core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE;
 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

Did you alter/customize this table or delete orders from database before?

Compare with my magento1.5 database,

PRIMARY KEY (`item_id`),
INDEX `IDX_ORDER` (`order_id`),
INDEX `IDX_STORE_ID` (`store_id`),
INDEX `IDX_PRODUCT_ID` (`product_id`),
CONSTRAINT `FK_SALES_FLAT_ORDER_ITEM_PARENTFOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT `FK_SALES_FLAT_ORDER_ITEM_STOREFOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE SET NULL
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
ROW_FORMAT
=DEFAULT
AUTO_INCREMENT=

It looks your table missed one foregn key ‘FK_SALES_FLAT_ORDER_ITEM_PARENT’, which keep the order ids are matched in two tables(sales_flat_order and sales_flat_order_item).

tradiArt - 20 October 2011 06:24 AM

hankzh - 20 October 2011 06:09 AM
Did you mind post your table (mg_sales_flat_order_item)’s definition? such as primary key? index? foreign keys?

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- 
Database: `ddbb_test`
--

-- --------------------------------------------------------

--
-- 
Estructura de tabla para la tabla `mg_sales_flat_order_item`
--

CREATE TABLE IF NOT EXISTS `mg_sales_flat_order_item` (
  `
item_idint(10unsigned NOT NULL auto_increment,
  `
order_idint(10unsigned NOT NULL default '0',
  `
parent_item_idint(10unsigned default NULL,
  `
quote_item_idint(10unsigned default NULL,
  `
store_idsmallint(5unsigned default NULL,
  `
created_atdatetime NOT NULL default '0000-00-00 00:00:00',
  `
updated_atdatetime NOT NULL default '0000-00-00 00:00:00',
  `
product_idint(10unsigned default NULL,
  `
product_typevarchar(255) default NULL,
  `
product_optionstext,
  `
weightdecimal(12,4) default '0.0000',
  `
is_virtualtinyint(1unsigned default NULL,
  `
skuvarchar(255NOT NULL default '',
  `
namevarchar(255) default NULL,
  `
descriptiontext,
  `
applied_rule_idstext,
  `
additional_datatext,
  `
free_shippingtinyint(1unsigned NOT NULL default '0',
  `
is_qty_decimaltinyint(1unsigned default NULL,
  `
no_discounttinyint(1unsigned default '0',
  `
qty_backordereddecimal(12,4) default '0.0000',
  `
qty_canceleddecimal(12,4) default '0.0000',
  `
qty_invoiceddecimal(12,4) default '0.0000',
  `
qty_ordereddecimal(12,4) default '0.0000',
  `
qty_refundeddecimal(12,4) default '0.0000',
  `
qty_shippeddecimal(12,4) default '0.0000',
  `
base_costdecimal(12,4) default '0.0000',
  `
pricedecimal(12,4NOT NULL default '0.0000',
  `
base_pricedecimal(12,4NOT NULL default '0.0000',
  `
original_pricedecimal(12,4) default NULL,
  `
base_original_pricedecimal(12,4) default NULL,
  `
tax_percentdecimal(12,4) default '0.0000',
  `
tax_amountdecimal(12,4) default '0.0000',
  `
base_tax_amountdecimal(12,4) default '0.0000',
  `
tax_invoiceddecimal(12,4) default '0.0000',
  `
base_tax_invoiceddecimal(12,4) default '0.0000',
  `
discount_percentdecimal(12,4) default '0.0000',
  `
discount_amountdecimal(12,4) default '0.0000',
  `
base_discount_amountdecimal(12,4) default '0.0000',
  `
discount_invoiceddecimal(12,4) default '0.0000',
  `
base_discount_invoiceddecimal(12,4) default '0.0000',
  `
amount_refundeddecimal(12,4) default '0.0000',
  `
base_amount_refundeddecimal(12,4) default '0.0000',
  `
row_totaldecimal(12,4NOT NULL default '0.0000',
  `
base_row_totaldecimal(12,4NOT NULL default '0.0000',
  `
row_invoiceddecimal(12,4NOT NULL default '0.0000',
  `
base_row_invoiceddecimal(12,4NOT NULL default '0.0000',
  `
row_weightdecimal(12,4) default '0.0000',
  `
gift_message_idint(10) default NULL,
  `
gift_message_availableint(10) default NULL,
  `
base_tax_before_discountdecimal(12,4) default NULL,
  `
tax_before_discountdecimal(12,4) default NULL,
  `
weee_tax_appliedtext,
  `
weee_tax_applied_amountdecimal(12,4) default NULL,
  `
weee_tax_applied_row_amountdecimal(12,4) default NULL,
  `
base_weee_tax_applied_amountdecimal(12,4) default NULL,
  `
base_weee_tax_applied_row_amountdecimal(12,4) default NULL,
  `
weee_tax_dispositiondecimal(12,4) default NULL,
  `
weee_tax_row_dispositiondecimal(12,4) default NULL,
  `
base_weee_tax_dispositiondecimal(12,4) default NULL,
  `
base_weee_tax_row_dispositiondecimal(12,4) default NULL,
  `
ext_order_item_idvarchar(255) default NULL,
  `
locked_do_invoiceint(10unsigned default NULL,
  `
locked_do_shipint(10unsigned default NULL,
  `
price_incl_taxdecimal(12,4) default NULL,
  `
base_price_incl_taxdecimal(12,4) default NULL,
  `
row_total_incl_taxdecimal(12,4) default NULL,
  `
base_row_total_incl_taxdecimal(12,4) default NULL,
  `
hidden_tax_amountdecimal(12,4) default NULL,
  `
base_hidden_tax_amountdecimal(12,4) default NULL,
  `
hidden_tax_invoiceddecimal(12,4) default NULL,
  `
base_hidden_tax_invoiceddecimal(12,4) default NULL,
  `
hidden_tax_refundeddecimal(12,4) default NULL,
  `
base_hidden_tax_refundeddecimal(12,4) default NULL,
  `
is_nominalint(11NOT NULL default '0',
  `
tax_canceleddecimal(12,4) default NULL,
  `
hidden_tax_canceleddecimal(12,4) default NULL,
  `
tax_refundeddecimal(12,4) default NULL,
  
PRIMARY KEY  (`item_id`),
  
KEY `IDX_STORE_ID` (`store_id`),
  
KEY `IDX_PRODUCT_ID` (`product_id`)
ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5320 ;

--
-- 
Filtros para las tablas descargadas (dump)
--

--
-- 
Filtros para la tabla `mg_sales_flat_order_item`
--
ALTER TABLE `mg_sales_flat_order_item`
  
ADD CONSTRAINT `FK_SALES_ORDER_ITEM_STOREFOREIGN KEY (`store_id`) REFERENCES `mg_core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE;
 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 
hankzh - 20 October 2011 07:09 AM

Did you alter/customize this table or delete orders from database before?

Compare with my magento1.5 database,

It looks your table missed one foregn key ‘FK_SALES_FLAT_ORDER_ITEM_PARENT’, which keep the order ids are matched in two tables(sales_flat_order and sales_flat_order_item).

We are using this plugin: http://www.yireo.com/software/delete-any-order

Do you think that is the reason for the failure? We haven’t modified the code or the database directly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

I didn’t install that module, so I am not sure about it.
If you want, you can check the module code under the sql folder. Or you can send the provider an email.

tradiArt - 20 October 2011 07:15 AM

hankzh - 20 October 2011 07:09 AM
Did you alter/customize this table or delete orders from database before?

Compare with my magento1.5 database,

It looks your table missed one foregn key ‘FK_SALES_FLAT_ORDER_ITEM_PARENT’, which keep the order ids are matched in two tables(sales_flat_order and sales_flat_order_item).

We are using this plugin: http://www.yireo.com/software/delete-any-order

Do you think that is the reason for the failure? We haven’t modified the code or the database directly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 
hankzh - 20 October 2011 07:28 AM

I didn’t install that module, so I am not sure about it.
If you want, you can check the module code under the sql folder. Or you can send the provider an email.

@hankzh We have already sent an email to Yireo.

Also, I ask the community, is this tool:

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/db-repair-tool

still active in development? Do you think this is going to help this situation?

Really appreciate your assistance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Has anybody test this?

http://www.gpmd.co.uk/blog/magento-1-6-upgrade/

 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

That tool looks cool. I think that you can try it if you hurry to fix this issue, just remember backup your data first.

@hankzh We have already sent an email to Yireo.

Also, I ask the community, is this tool:

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/db-repair-tool

still active in development? Do you think this is going to help this situation?

Really appreciate your assistance.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3