PDOException Object
(
    [message:protected] => SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'ves_brand_brand_store' already exists
    [string:Exception:private] => 
    [code:protected] => 42S01
    [file:protected] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Zend/Db/Statement/Pdo.php
    [line:protected] => 228
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Zend/Db/Statement/Pdo.php
                    [line] => 228
                    [function] => execute
                    [class] => PDOStatement
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [1] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Varien/Db/Statement/Pdo/Mysql.php
                    [line] => 110
                    [function] => _execute
                    [class] => Zend_Db_Statement_Pdo
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [2] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Zend/Db/Statement.php
                    [line] => 291
                    [function] => _execute
                    [class] => Varien_Db_Statement_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [3] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Zend/Db/Adapter/Abstract.php
                    [line] => 480
                    [function] => execute
                    [class] => Zend_Db_Statement
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [4] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Zend/Db/Adapter/Pdo/Abstract.php
                    [line] => 238
                    [function] => query
                    [class] => Zend_Db_Adapter_Abstract
                    [type] => ->
                    [args] => Array
                        (
                            [0] => -- DROP TABLE IF EXISTS `ves_brand_brand_store`;
CREATE TABLE `ves_brand_brand_store` (
  `brand_id` int(10) unsigned NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`brand_id`,`store_id`),
  CONSTRAINT `FK_BRAND_BRAND_STORE_THEME` FOREIGN KEY (`brand_id`) REFERENCES `ves_brand_brand` (`brand_id`) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT `FK_BRAND_BRAND_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brand items to Stores'
                            [1] => Array
                                (
                                )

                        )

                )

            [5] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 428
                    [function] => query
                    [class] => Zend_Db_Adapter_Pdo_Abstract
                    [type] => ->
                    [args] => Array
                        (
                            [0] => -- DROP TABLE IF EXISTS `ves_brand_brand_store`;
CREATE TABLE `ves_brand_brand_store` (
  `brand_id` int(10) unsigned NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`brand_id`,`store_id`),
  CONSTRAINT `FK_BRAND_BRAND_STORE_THEME` FOREIGN KEY (`brand_id`) REFERENCES `ves_brand_brand` (`brand_id`) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT `FK_BRAND_BRAND_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brand items to Stores'
                            [1] => Array
                                (
                                )

                        )

                )

            [6] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 347
                    [function] => query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => -- DROP TABLE IF EXISTS `ves_brand_brand_store`;
CREATE TABLE `ves_brand_brand_store` (
  `brand_id` int(10) unsigned NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`brand_id`,`store_id`),
  CONSTRAINT `FK_BRAND_BRAND_STORE_THEME` FOREIGN KEY (`brand_id`) REFERENCES `ves_brand_brand` (`brand_id`) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT `FK_BRAND_BRAND_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brand items to Stores'
                        )

                )

            [7] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 617
                    [function] => raw_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => -- DROP TABLE IF EXISTS `ves_brand_brand_store`;
CREATE TABLE `ves_brand_brand_store` (
  `brand_id` int(10) unsigned NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`brand_id`,`store_id`),
  CONSTRAINT `FK_BRAND_BRAND_STORE_THEME` FOREIGN KEY (`brand_id`) REFERENCES `ves_brand_brand` (`brand_id`) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT `FK_BRAND_BRAND_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brand items to Stores'
                        )

                )

            [8] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 599
                    [function] => multi_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
 
CREATE TABLE IF NOT EXISTS `ves_brand_brand` (
  `brand_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `description` text NOT NULL,
  `title` varchar(255) NOT NULL DEFAULT '',
  `layout` varchar(250) NOT NULL,
  `identifier` varchar(255) NOT NULL DEFAULT '',
  `parent_id` int(11) NOT NULL DEFAULT '0',
  `file` varchar(255) NOT NULL,
  `icon` varchar(255) NOT NULL,
  `meta_keywords` text NOT NULL,
  `meta_description` text NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`brand_id`),
  UNIQUE KEY `identifier` (`identifier`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

-- DROP TABLE IF EXISTS `ves_brand_brand_store`;
CREATE TABLE `ves_brand_brand_store` (
  `brand_id` int(10) unsigned NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`brand_id`,`store_id`),
  CONSTRAINT `FK_BRAND_BRAND_STORE_THEME` FOREIGN KEY (`brand_id`) REFERENCES `ves_brand_brand` (`brand_id`) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT `FK_BRAND_BRAND_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brand items to Stores';


                        )

                )

            [9] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 933
                    [function] => multiQuery
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
 
CREATE TABLE IF NOT EXISTS `ves_brand_brand` (
  `brand_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `description` text NOT NULL,
  `title` varchar(255) NOT NULL DEFAULT '',
  `layout` varchar(250) NOT NULL,
  `identifier` varchar(255) NOT NULL DEFAULT '',
  `parent_id` int(11) NOT NULL DEFAULT '0',
  `file` varchar(255) NOT NULL,
  `icon` varchar(255) NOT NULL,
  `meta_keywords` text NOT NULL,
  `meta_description` text NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`brand_id`),
  UNIQUE KEY `identifier` (`identifier`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

-- DROP TABLE IF EXISTS `ves_brand_brand_store`;
CREATE TABLE `ves_brand_brand_store` (
  `brand_id` int(10) unsigned NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`brand_id`,`store_id`),
  CONSTRAINT `FK_BRAND_BRAND_STORE_THEME` FOREIGN KEY (`brand_id`) REFERENCES `ves_brand_brand` (`brand_id`) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT `FK_BRAND_BRAND_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brand items to Stores';


                        )

                )

            [10] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/community/Ves/Brand/sql/ves_brand_setup/mysql4-install-1.1.0.php
                    [line] => 44
                    [function] => run
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
 
CREATE TABLE IF NOT EXISTS `ves_brand_brand` (
  `brand_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `description` text NOT NULL,
  `title` varchar(255) NOT NULL DEFAULT '',
  `layout` varchar(250) NOT NULL,
  `identifier` varchar(255) NOT NULL DEFAULT '',
  `parent_id` int(11) NOT NULL DEFAULT '0',
  `file` varchar(255) NOT NULL,
  `icon` varchar(255) NOT NULL,
  `meta_keywords` text NOT NULL,
  `meta_description` text NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`brand_id`),
  UNIQUE KEY `identifier` (`identifier`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

-- DROP TABLE IF EXISTS `ves_brand_brand_store`;
CREATE TABLE `ves_brand_brand_store` (
  `brand_id` int(10) unsigned NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`brand_id`,`store_id`),
  CONSTRAINT `FK_BRAND_BRAND_STORE_THEME` FOREIGN KEY (`brand_id`) REFERENCES `ves_brand_brand` (`brand_id`) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT `FK_BRAND_BRAND_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brand items to Stores';


                        )

                )

            [11] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 624
                    [args] => Array
                        (
                            [0] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/community/Ves/Brand/sql/ves_brand_setup/mysql4-install-1.1.0.php
                        )

                    [function] => include
                )

            [12] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 421
                    [function] => _modifyResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => install
                            [1] => 
                            [2] => 1.2.0
                        )

                )

            [13] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 327
                    [function] => _installResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 1.2.0
                        )

                )

            [14] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 235
                    [function] => applyUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [15] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Mage/Core/Model/App.php
                    [line] => 417
                    [function] => applyAllUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ::
                    [args] => Array
                        (
                        )

                )

            [16] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/code/core/Mage/Core/Model/App.php
                    [line] => 343
                    [function] => _initModules
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [17] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/app/Mage.php
                    [line] => 684
                    [function] => run
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [scope_code] => 
                                    [scope_type] => store
                                    [options] => Array
                                        (
                                        )

                                )

                        )

                )

            [18] => Array
                (
                    [file] => /var/www/vhosts/macbaby.ir/httpdocs/en/index.php
                    [line] => 87
                    [function] => run
                    [class] => Mage
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => store
                        )

                )

        )

    [previous:Exception:private] => 
    [errorInfo] => Array
        (
            [0] => 42S01
            [1] => 1050
            [2] => Table 'ves_brand_brand_store' already exists
        )

)