PDOException Object
(
[message:protected] => SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tax_class' already exists
[string:private] =>
[code:protected] => 42S01
[file:protected] => /var/www/domains/w3.ridleyparts.com/docs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line:protected] => 207
[trace:private] => Array
(
[0] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 207
[function] => query
[class] => PDO
[type] => ->
[args] => Array
(
[0] => /*Table structure for table `tax_class` */
-- DROP TABLE IF EXISTS tax_class;
CREATE TABLE tax_class (
`class_id` smallint(6) NOT NULL auto_increment,
`class_name` varchar(255) NOT NULL default '',
`class_type` enum('CUSTOMER','PRODUCT') NOT NULL default 'CUSTOMER',
PRIMARY KEY (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
)
)
[1] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 310
[function] => raw_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => /*Table structure for table `tax_class` */
-- DROP TABLE IF EXISTS tax_class;
CREATE TABLE tax_class (
`class_id` smallint(6) NOT NULL auto_increment,
`class_name` varchar(255) NOT NULL default '',
`class_type` enum('CUSTOMER','PRODUCT') NOT NULL default 'CUSTOMER',
PRIMARY KEY (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
)
)
[2] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 508
[function] => multi_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] =>
/*Table structure for table `tax_class` */
-- DROP TABLE IF EXISTS tax_class;
CREATE TABLE tax_class (
`class_id` smallint(6) NOT NULL auto_increment,
`class_name` varchar(255) NOT NULL default '',
`class_type` enum('CUSTOMER','PRODUCT') NOT NULL default 'CUSTOMER',
PRIMARY KEY (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_class` */
insert into tax_class(`class_id`,`class_name`,`class_type`) values (2,'Taxable Goods','PRODUCT'),(3,'Retail Customer','CUSTOMER');
/*Table structure for table `tax_rate` */
-- DROP TABLE IF EXISTS tax_rate;
CREATE TABLE tax_rate (
`tax_rate_id` tinyint(4) NOT NULL auto_increment,
`tax_county_id` smallint(6) default NULL,
`tax_region_id` mediumint(9) unsigned default NULL,
`tax_postcode` varchar(12) default NULL,
PRIMARY KEY (`tax_rate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Base tax rates';
/*Data for the table `tax_rate` */
insert into tax_rate(`tax_rate_id`,`tax_county_id`,`tax_region_id`,`tax_postcode`) values (1,0,12,NULL),(2,0,43,NULL);
/*Table structure for table `tax_rate_data` */
-- DROP TABLE IF EXISTS tax_rate_data;
CREATE TABLE tax_rate_data (
`tax_rate_data_id` tinyint(4) NOT NULL auto_increment,
`tax_rate_id` tinyint(4) NOT NULL default '0',
`rate_value` decimal(12,4) NOT NULL default '0.0000',
`rate_type_id` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`tax_rate_data_id`),
KEY `rate_id` (`tax_rate_id`),
KEY `rate_type_id` (`rate_type_id`),
UNIQUE idx_rate_rate_type (tax_rate_id, rate_type_id),
CONSTRAINT `FK_TAX_RATE_DATA_TAX_RATE` FOREIGN KEY (`tax_rate_id`) REFERENCES tax_rate (`tax_rate_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_TAX_RATE_DATE_TAX_RATE_TYPE` FOREIGN KEY (`rate_type_id`) REFERENCES tax_rate_type (`type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_rate_data` */
insert into tax_rate_data(`tax_rate_data_id`,`tax_rate_id`,`rate_value`,`rate_type_id`) values (6,2,8.3750,1),(7,2,0.0000,2),(8,2,0.0000,3),(9,2,0.0000,4),(10,2,0.0000,5),(31,1,8.2500,1),(32,1,0.0000,2),(33,1,0.0000,3),(34,1,0.0000,4),(35,1,0.0000,5);
/*Table structure for table `tax_rate_type` */
-- DROP TABLE IF EXISTS tax_rate_type;
CREATE TABLE tax_rate_type (
`type_id` tinyint(4) NOT NULL auto_increment,
`type_name` varchar(255) NOT NULL default '',
PRIMARY KEY (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_rate_type` */
insert into tax_rate_type(`type_id`,`type_name`) values (1,'Rate 1'),(2,'Rate 2'),(3,'Rate 3'),(4,'Rate 4'),(5,'Rate 5');
/*Table structure for table `tax_rule` */
-- DROP TABLE IF EXISTS tax_rule;
CREATE TABLE tax_rule (
`tax_rule_id` tinyint(4) NOT NULL auto_increment,
`tax_customer_class_id` smallint(6) NOT NULL default '0',
`tax_product_class_id` smallint(6) NOT NULL default '0',
`tax_rate_type_id` tinyint(4) NOT NULL default '0',
`tax_shipping` tinyint (1) NOT NULL default '0',
PRIMARY KEY (`tax_rule_id`),
KEY `tax_customer_class_id` (`tax_customer_class_id`,`tax_product_class_id`),
KEY `tax_customer_class_id_2` (`tax_customer_class_id`),
KEY `tax_product_class_id` (`tax_product_class_id`),
KEY `tax_rate_id` (`tax_rate_type_id`),
CONSTRAINT `FK_TAX_RULE_TAX_CLASS_CUSTOMER` FOREIGN KEY (`tax_customer_class_id`) REFERENCES tax_class (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_TAX_RULE_TAX_CLASS_PRODUCT` FOREIGN KEY (`tax_product_class_id`) REFERENCES tax_class (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_rule` */
insert into tax_rule(`tax_rule_id`,`tax_customer_class_id`,`tax_product_class_id`,`tax_rate_type_id`) values (1,3,2,1);
)
)
[3] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Tax/sql/tax_setup/mysql4-install-0.7.0.php
[line] => 120
[function] => run
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] =>
/*Table structure for table `tax_class` */
-- DROP TABLE IF EXISTS tax_class;
CREATE TABLE tax_class (
`class_id` smallint(6) NOT NULL auto_increment,
`class_name` varchar(255) NOT NULL default '',
`class_type` enum('CUSTOMER','PRODUCT') NOT NULL default 'CUSTOMER',
PRIMARY KEY (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_class` */
insert into tax_class(`class_id`,`class_name`,`class_type`) values (2,'Taxable Goods','PRODUCT'),(3,'Retail Customer','CUSTOMER');
/*Table structure for table `tax_rate` */
-- DROP TABLE IF EXISTS tax_rate;
CREATE TABLE tax_rate (
`tax_rate_id` tinyint(4) NOT NULL auto_increment,
`tax_county_id` smallint(6) default NULL,
`tax_region_id` mediumint(9) unsigned default NULL,
`tax_postcode` varchar(12) default NULL,
PRIMARY KEY (`tax_rate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Base tax rates';
/*Data for the table `tax_rate` */
insert into tax_rate(`tax_rate_id`,`tax_county_id`,`tax_region_id`,`tax_postcode`) values (1,0,12,NULL),(2,0,43,NULL);
/*Table structure for table `tax_rate_data` */
-- DROP TABLE IF EXISTS tax_rate_data;
CREATE TABLE tax_rate_data (
`tax_rate_data_id` tinyint(4) NOT NULL auto_increment,
`tax_rate_id` tinyint(4) NOT NULL default '0',
`rate_value` decimal(12,4) NOT NULL default '0.0000',
`rate_type_id` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`tax_rate_data_id`),
KEY `rate_id` (`tax_rate_id`),
KEY `rate_type_id` (`rate_type_id`),
UNIQUE idx_rate_rate_type (tax_rate_id, rate_type_id),
CONSTRAINT `FK_TAX_RATE_DATA_TAX_RATE` FOREIGN KEY (`tax_rate_id`) REFERENCES tax_rate (`tax_rate_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_TAX_RATE_DATE_TAX_RATE_TYPE` FOREIGN KEY (`rate_type_id`) REFERENCES tax_rate_type (`type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_rate_data` */
insert into tax_rate_data(`tax_rate_data_id`,`tax_rate_id`,`rate_value`,`rate_type_id`) values (6,2,8.3750,1),(7,2,0.0000,2),(8,2,0.0000,3),(9,2,0.0000,4),(10,2,0.0000,5),(31,1,8.2500,1),(32,1,0.0000,2),(33,1,0.0000,3),(34,1,0.0000,4),(35,1,0.0000,5);
/*Table structure for table `tax_rate_type` */
-- DROP TABLE IF EXISTS tax_rate_type;
CREATE TABLE tax_rate_type (
`type_id` tinyint(4) NOT NULL auto_increment,
`type_name` varchar(255) NOT NULL default '',
PRIMARY KEY (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_rate_type` */
insert into tax_rate_type(`type_id`,`type_name`) values (1,'Rate 1'),(2,'Rate 2'),(3,'Rate 3'),(4,'Rate 4'),(5,'Rate 5');
/*Table structure for table `tax_rule` */
-- DROP TABLE IF EXISTS tax_rule;
CREATE TABLE tax_rule (
`tax_rule_id` tinyint(4) NOT NULL auto_increment,
`tax_customer_class_id` smallint(6) NOT NULL default '0',
`tax_product_class_id` smallint(6) NOT NULL default '0',
`tax_rate_type_id` tinyint(4) NOT NULL default '0',
`tax_shipping` tinyint (1) NOT NULL default '0',
PRIMARY KEY (`tax_rule_id`),
KEY `tax_customer_class_id` (`tax_customer_class_id`,`tax_product_class_id`),
KEY `tax_customer_class_id_2` (`tax_customer_class_id`),
KEY `tax_product_class_id` (`tax_product_class_id`),
KEY `tax_rate_id` (`tax_rate_type_id`),
CONSTRAINT `FK_TAX_RULE_TAX_CLASS_CUSTOMER` FOREIGN KEY (`tax_customer_class_id`) REFERENCES tax_class (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_TAX_RULE_TAX_CLASS_PRODUCT` FOREIGN KEY (`tax_product_class_id`) REFERENCES tax_class (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `tax_rule` */
insert into tax_rule(`tax_rule_id`,`tax_customer_class_id`,`tax_product_class_id`,`tax_rate_type_id`) values (1,3,2,1);
)
)
[4] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 274
[args] => Array
(
[0] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Tax/sql/tax_setup/mysql4-install-0.7.0.php
)
[function] => include
)
[5] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 167
[function] => _modifyResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => install
[1] =>
[2] => 0.7.8
)
)
[6] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 155
[function] => _installResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => 0.7.8
)
)
[7] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 121
[function] => applyUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
)
)
[8] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Core/Model/Config.php
[line] => 214
[function] => applyAllUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ::
[args] => Array
(
)
)
[9] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/code/core/Mage/Core/Model/App.php
[line] => 242
[function] => init
[class] => Mage_Core_Model_Config
[type] => ->
[args] => Array
(
[0] => Array
(
)
)
)
[10] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/Mage.php
[line] => 432
[function] => init
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
[0] =>
[1] => store
[2] => Array
(
)
)
)
[11] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/app/Mage.php
[line] => 453
[function] => app
[class] => Mage
[type] => ::
[args] => Array
(
[0] =>
[1] => store
[2] => Array
(
)
)
)
[12] => Array
(
[file] => /var/www/domains/w3.ridleyparts.com/docs/index.php
[line] => 52
[function] => run
[class] => Mage
[type] => ::
[args] => Array
(
)
)
)
[errorInfo] => Array
(
[0] => 42S01
[1] => 1050
[2] => Table 'tax_class' already exists
)
)