PDOException Object
(
    [message:protected] => SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name 'michael_elkjaernetcatalog_product_index_price_idx_cfg_opt_aggregate'
    [string:private] => 
    [code:protected] => 42000
    [file:protected] => /home/www/xn--elkjr-vra.net/lib/Varien/Db/Adapter/Pdo/Mysql.php
    [line:protected] => 276
    [trace:private] => Array
        (
            [0] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 276
                    [function] => query
                    [class] => PDO
                    [type] => ->
                    [args] => Array
                        (
                            [0] => DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_cfg_opt_aggregate`
                        )

                )

            [1] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 397
                    [function] => raw_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_cfg_opt_aggregate`
                        )

                )

            [2] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 636
                    [function] => multi_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_cfg_opt_aggregate`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_idx` (
    `parent_id` int(10) unsigned NOT NULL,
    `child_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `price` decimal(12,4) default NULL,
    `tier_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`parent_id`,`child_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_tmp` (
     `entity_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `min_price` decimal(12,4) default NULL,
    `max_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_cfg_option`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_idx` (
    `entity_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `min_price` decimal(12,4) default NULL,
    `max_price` decimal(12,4) default NULL,
    `tier_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_tmp` (
    `entity_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `min_price` decimal(12,4) default NULL,
    `max_price` decimal(12,4) default NULL,
    `tier_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_final_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_final_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_final_idx` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `tax_class_id` SMALLINT(5) UNSIGNED DEFAULT '0',
    `orig_price` DECIMAL(12,4) DEFAULT NULL,
    `price` DECIMAL(12,4) DEFAULT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    `base_tier` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_final_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_final_tmp` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `tax_class_id` SMALLINT(5) UNSIGNED DEFAULT '0',
    `orig_price` DECIMAL(12,4) DEFAULT NULL,
    `price` DECIMAL(12,4) DEFAULT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    `base_tier` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_option`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_idx` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_tmp` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_option_aggregate`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_agr_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_agr_idx` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `option_id` INT(10) UNSIGNED DEFAULT '0',
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`, `option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_agr_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_agr_tmp` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `option_id` INT(10) UNSIGNED DEFAULT '0',
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`, `option_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_idx` (
    `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` int(10) unsigned NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_tmp` (
    `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` int(10) unsigned NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_decimal_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_decimal_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_decimal_idx` (
     `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` decimal(12,4) NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_decimal_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_decimal_tmp` (
     `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` decimal(12,4) NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_idx` (
     `entity_id` int(10) unsigned NOT NULL,
     `customer_group_id` smallint(5) unsigned NOT NULL,
     `website_id` smallint(5) unsigned NOT NULL,
     `tax_class_id` smallint(5) unsigned default '0',
     `price` decimal(12,4) default NULL,
     `final_price` decimal(12,4) default NULL,
     `min_price` decimal(12,4) default NULL,
     `max_price` decimal(12,4) default NULL,
     `tier_price` decimal(12,4) default NULL,
     PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`),
     KEY `IDX_CUSTOMER_GROUP` (`customer_group_id`),
     KEY `IDX_WEBSITE` (`website_id`),
     KEY `IDX_MIN_PRICE` (`min_price`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_tmp` (
     `entity_id` int(10) unsigned NOT NULL,
     `customer_group_id` smallint(5) unsigned NOT NULL,
     `website_id` smallint(5) unsigned NOT NULL,
     `tax_class_id` smallint(5) unsigned default '0',
     `price` decimal(12,4) default NULL,
     `final_price` decimal(12,4) default NULL,
     `min_price` decimal(12,4) default NULL,
     `max_price` decimal(12,4) default NULL,
     `tier_price` decimal(12,4) default NULL,
     PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`),
     KEY `IDX_CUSTOMER_GROUP` (`customer_group_id`),
     KEY `IDX_WEBSITE` (`website_id`),
     KEY `IDX_MIN_PRICE` (`min_price`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_idx`;

CREATE TABLE `michael_elkjaernetcatalog_category_product_index_idx` (
     `category_id` int(10) unsigned NOT NULL default '0',
     `product_id` int(10) unsigned NOT NULL default '0',
     `position` int(10) NOT NULL default '0',
     `is_parent` tinyint(1) unsigned NOT NULL default '0',
     `store_id` smallint(5) unsigned NOT NULL default '0',
     `visibility` tinyint(3) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_product_index_tmp` (
     `category_id` int(10) unsigned NOT NULL default '0',
     `product_id` int(10) unsigned NOT NULL default '0',
     `position` int(10) NOT NULL default '0',
     `is_parent` tinyint(1) unsigned NOT NULL default '0',
     `store_id` smallint(5) unsigned NOT NULL default '0',
     `visibility` tinyint(3) unsigned NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernettmp_category_index_enabled_products`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_enbl_idx`;
CREATE TABLE `michael_elkjaernetcatalog_category_product_index_enbl_idx` (
    `product_id` int(10) unsigned NOT NULL DEFAULT '0',
    `visibility` int(11) unsigned NOT NULL DEFAULT '0',
    KEY `IDX_PRODUCT` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_enbl_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_product_index_enbl_tmp` (
    `product_id` int(10) unsigned NOT NULL DEFAULT '0',
    `visibility` int(11) unsigned NOT NULL DEFAULT '0',
    KEY `IDX_PRODUCT` (`product_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernettmp_category_index_anchor_categories`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_categs_index_idx`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_categs_index_idx` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `path` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    KEY `IDX_CATEGORY` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_categs_index_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_categs_index_tmp` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `path` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    KEY `IDX_CATEGORY` (`category_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernettmp_category_index_anchor_products`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_products_index_idx`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_products_index_idx` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `product_id` int(10) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_products_index_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_products_index_tmp` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `product_id` int(10) unsigned NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8;


                        )

                )

            [3] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php
                    [line] => 321
                    [function] => run
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_cfg_opt_aggregate`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_idx` (
    `parent_id` int(10) unsigned NOT NULL,
    `child_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `price` decimal(12,4) default NULL,
    `tier_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`parent_id`,`child_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_agr_tmp` (
     `entity_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `min_price` decimal(12,4) default NULL,
    `max_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_cfg_option`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_idx` (
    `entity_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `min_price` decimal(12,4) default NULL,
    `max_price` decimal(12,4) default NULL,
    `tier_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_cfg_opt_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_cfg_opt_tmp` (
    `entity_id` int(10) unsigned NOT NULL,
    `customer_group_id` smallint(5) unsigned NOT NULL,
    `website_id` smallint(5) unsigned NOT NULL,
    `min_price` decimal(12,4) default NULL,
    `max_price` decimal(12,4) default NULL,
    `tier_price` decimal(12,4) default NULL,
    PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_final_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_final_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_final_idx` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `tax_class_id` SMALLINT(5) UNSIGNED DEFAULT '0',
    `orig_price` DECIMAL(12,4) DEFAULT NULL,
    `price` DECIMAL(12,4) DEFAULT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    `base_tier` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_final_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_final_tmp` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `tax_class_id` SMALLINT(5) UNSIGNED DEFAULT '0',
    `orig_price` DECIMAL(12,4) DEFAULT NULL,
    `price` DECIMAL(12,4) DEFAULT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    `base_tier` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_option`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_idx` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_tmp` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx_option_aggregate`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_agr_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_agr_idx` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `option_id` INT(10) UNSIGNED DEFAULT '0',
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`, `option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_opt_agr_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_opt_agr_tmp` (
    `entity_id` INT(10) UNSIGNED NOT NULL,
    `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
    `website_id` SMALLINT(5) UNSIGNED NOT NULL,
    `option_id` INT(10) UNSIGNED DEFAULT '0',
    `min_price` DECIMAL(12,4) DEFAULT NULL,
    `max_price` DECIMAL(12,4) DEFAULT NULL,
    `tier_price` DECIMAL(12,4) DEFAULT NULL,
    PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`, `option_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_idx` (
    `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` int(10) unsigned NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_tmp` (
    `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` int(10) unsigned NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_decimal_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_decimal_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_decimal_idx` (
     `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` decimal(12,4) NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_eav_decimal_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_eav_decimal_tmp` (
     `entity_id` int(10) unsigned NOT NULL,
     `attribute_id` smallint(5) unsigned NOT NULL,
     `store_id` smallint(5) unsigned NOT NULL,
     `value` decimal(12,4) NOT NULL,
     PRIMARY KEY  (`entity_id`,`attribute_id`,`store_id`,`value`),
     KEY `IDX_ENTITY` (`entity_id`),
     KEY `IDX_ATTRIBUTE` (`attribute_id`),
     KEY `IDX_STORE` (`store_id`),
     KEY `IDX_VALUE` (`value`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_idx`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_idx` (
     `entity_id` int(10) unsigned NOT NULL,
     `customer_group_id` smallint(5) unsigned NOT NULL,
     `website_id` smallint(5) unsigned NOT NULL,
     `tax_class_id` smallint(5) unsigned default '0',
     `price` decimal(12,4) default NULL,
     `final_price` decimal(12,4) default NULL,
     `min_price` decimal(12,4) default NULL,
     `max_price` decimal(12,4) default NULL,
     `tier_price` decimal(12,4) default NULL,
     PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`),
     KEY `IDX_CUSTOMER_GROUP` (`customer_group_id`),
     KEY `IDX_WEBSITE` (`website_id`),
     KEY `IDX_MIN_PRICE` (`min_price`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_product_index_price_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_product_index_price_tmp` (
     `entity_id` int(10) unsigned NOT NULL,
     `customer_group_id` smallint(5) unsigned NOT NULL,
     `website_id` smallint(5) unsigned NOT NULL,
     `tax_class_id` smallint(5) unsigned default '0',
     `price` decimal(12,4) default NULL,
     `final_price` decimal(12,4) default NULL,
     `min_price` decimal(12,4) default NULL,
     `max_price` decimal(12,4) default NULL,
     `tier_price` decimal(12,4) default NULL,
     PRIMARY KEY  (`entity_id`,`customer_group_id`,`website_id`),
     KEY `IDX_CUSTOMER_GROUP` (`customer_group_id`),
     KEY `IDX_WEBSITE` (`website_id`),
     KEY `IDX_MIN_PRICE` (`min_price`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_idx`;

CREATE TABLE `michael_elkjaernetcatalog_category_product_index_idx` (
     `category_id` int(10) unsigned NOT NULL default '0',
     `product_id` int(10) unsigned NOT NULL default '0',
     `position` int(10) NOT NULL default '0',
     `is_parent` tinyint(1) unsigned NOT NULL default '0',
     `store_id` smallint(5) unsigned NOT NULL default '0',
     `visibility` tinyint(3) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_product_index_tmp` (
     `category_id` int(10) unsigned NOT NULL default '0',
     `product_id` int(10) unsigned NOT NULL default '0',
     `position` int(10) NOT NULL default '0',
     `is_parent` tinyint(1) unsigned NOT NULL default '0',
     `store_id` smallint(5) unsigned NOT NULL default '0',
     `visibility` tinyint(3) unsigned NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernettmp_category_index_enabled_products`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_enbl_idx`;
CREATE TABLE `michael_elkjaernetcatalog_category_product_index_enbl_idx` (
    `product_id` int(10) unsigned NOT NULL DEFAULT '0',
    `visibility` int(11) unsigned NOT NULL DEFAULT '0',
    KEY `IDX_PRODUCT` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_product_index_enbl_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_product_index_enbl_tmp` (
    `product_id` int(10) unsigned NOT NULL DEFAULT '0',
    `visibility` int(11) unsigned NOT NULL DEFAULT '0',
    KEY `IDX_PRODUCT` (`product_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernettmp_category_index_anchor_categories`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_categs_index_idx`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_categs_index_idx` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `path` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    KEY `IDX_CATEGORY` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_categs_index_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_categs_index_tmp` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `path` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    KEY `IDX_CATEGORY` (`category_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernettmp_category_index_anchor_products`;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_products_index_idx`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_products_index_idx` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `product_id` int(10) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `michael_elkjaernetcatalog_category_anc_products_index_tmp`;
CREATE TABLE `michael_elkjaernetcatalog_category_anc_products_index_tmp` (
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `product_id` int(10) unsigned NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8;


                        )

                )

            [4] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 376
                    [args] => Array
                        (
                            [0] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php
                        )

                    [function] => include
                )

            [5] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 289
                    [function] => _modifyResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => upgrade
                            [1] => 1.4.0.0.23
                            [2] => 1.4.0.0.28
                        )

                )

            [6] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 233
                    [function] => _upgradeResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 1.4.0.0.23
                            [1] => 1.4.0.0.28
                        )

                )

            [7] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 161
                    [function] => applyUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [8] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Core/Model/App.php
                    [line] => 363
                    [function] => applyAllUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ::
                    [args] => Array
                        (
                        )

                )

            [9] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/code/core/Mage/Core/Model/App.php
                    [line] => 295
                    [function] => _initModules
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [10] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/app/Mage.php
                    [line] => 596
                    [function] => run
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [scope_code] => 
                                    [scope_type] => store
                                    [options] => Array
                                        (
                                        )

                                )

                        )

                )

            [11] => Array
                (
                    [file] => /home/www/xn--elkjr-vra.net/index.php
                    [line] => 80
                    [function] => run
                    [class] => Mage
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => store
                        )

                )

        )

    [errorInfo] => Array
        (
            [0] => 42000
            [1] => 1103
            [2] => Incorrect table name 'michael_elkjaernetcatalog_product_index_price_idx_cfg_opt_aggregate'
        )

)