Jump to content

Problem importing database from previous server


Recommended Posts

Hi,

 

I'm having some troubles with importing the tables I have exported from phpMyAdmin from my old server into my new server.

 

I am able to import all tables properly without any issues, but from the following code onwards no matter which line it is there is always errors:

ALTER TABLE `ps_access`
  ADD PRIMARY KEY (`id_profile`,`id_tab`);

ALTER TABLE `ps_accessory`
  ADD KEY `accessory_product` (`id_product_1`,`id_product_2`);

ALTER TABLE `ps_address`
  ADD PRIMARY KEY (`id_address`), ADD KEY `address_customer` (`id_customer`), ADD KEY `id_country` (`id_country`), ADD KEY `id_state` (`id_state`), ADD KEY `id_manufacturer` (`id_manufacturer`), ADD KEY `id_supplier` (`id_supplier`), ADD KEY `id_warehouse` (`id_warehouse`);

ALTER TABLE `ps_address_format`
  ADD PRIMARY KEY (`id_country`);

ALTER TABLE `ps_advice`
  ADD PRIMARY KEY (`id_advice`);

ALTER TABLE `ps_advice_lang`
  ADD PRIMARY KEY (`id_advice`,`id_lang`);

ALTER TABLE `ps_alias`
  ADD PRIMARY KEY (`id_alias`), ADD UNIQUE KEY `alias` (`alias`);

ALTER TABLE `ps_attachment`
  ADD PRIMARY KEY (`id_attachment`);

ALTER TABLE `ps_attachment_lang`
  ADD PRIMARY KEY (`id_attachment`,`id_lang`);

ALTER TABLE `ps_attribute`
  ADD PRIMARY KEY (`id_attribute`), ADD KEY `attribute_group` (`id_attribute_group`);

ALTER TABLE `ps_attribute_group`
  ADD PRIMARY KEY (`id_attribute_group`);

ALTER TABLE `ps_attribute_group_lang`
  ADD PRIMARY KEY (`id_attribute_group`,`id_lang`);

ALTER TABLE `ps_attribute_group_shop`
  ADD PRIMARY KEY (`id_attribute_group`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_attribute_impact`
  ADD PRIMARY KEY (`id_attribute_impact`), ADD UNIQUE KEY `id_product` (`id_product`,`id_attribute`);

ALTER TABLE `ps_attribute_lang`
  ADD PRIMARY KEY (`id_attribute`,`id_lang`), ADD KEY `id_lang` (`id_lang`,`name`);

ALTER TABLE `ps_attribute_shop`
  ADD PRIMARY KEY (`id_attribute`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_availableweekdays`
  ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id_shop` (`id_shop`,`id_product`,`day`), ADD KEY `id_product` (`id_product`);

ALTER TABLE `ps_badge`
  ADD PRIMARY KEY (`id_badge`);

ALTER TABLE `ps_badge_lang`
  ADD PRIMARY KEY (`id_badge`,`id_lang`);

ALTER TABLE `ps_bettercustomization`
  ADD PRIMARY KEY (`id_bettercustomization`), ADD KEY `customization_field` (`customization_field`);

ALTER TABLE `ps_carrier`
  ADD PRIMARY KEY (`id_carrier`), ADD KEY `deleted` (`deleted`,`active`), ADD KEY `id_tax_rules_group` (`id_tax_rules_group`), ADD KEY `reference` (`id_reference`,`deleted`,`active`);

ALTER TABLE `ps_carrier_group`
  ADD PRIMARY KEY (`id_carrier`,`id_group`);

ALTER TABLE `ps_carrier_lang`
  ADD PRIMARY KEY (`id_lang`,`id_shop`,`id_carrier`);

ALTER TABLE `ps_carrier_shop`
  ADD PRIMARY KEY (`id_carrier`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_carrier_tax_rules_group_shop`
  ADD PRIMARY KEY (`id_carrier`,`id_tax_rules_group`,`id_shop`);

ALTER TABLE `ps_carrier_zone`
  ADD PRIMARY KEY (`id_carrier`,`id_zone`);

ALTER TABLE `ps_cart`
  ADD PRIMARY KEY (`id_cart`), ADD KEY `cart_customer` (`id_customer`), ADD KEY `id_address_delivery` (`id_address_delivery`), ADD KEY `id_address_invoice` (`id_address_invoice`), ADD KEY `id_carrier` (`id_carrier`), ADD KEY `id_lang` (`id_lang`), ADD KEY `id_currency` (`id_currency`), ADD KEY `id_guest` (`id_guest`), ADD KEY `id_shop_group` (`id_shop_group`), ADD KEY `id_shop_2` (`id_shop`,`date_upd`), ADD KEY `id_shop` (`id_shop`,`date_add`);

ALTER TABLE `ps_cart_cart_rule`
  ADD PRIMARY KEY (`id_cart`,`id_cart_rule`), ADD KEY `id_cart_rule` (`id_cart_rule`);

ALTER TABLE `ps_cart_product`
  ADD PRIMARY KEY (`id_cart`,`id_product`,`id_product_attribute`,`id_address_delivery`), ADD KEY `id_product_attribute` (`id_product_attribute`), ADD KEY `id_cart_order` (`id_cart`,`date_add`,`id_product`,`id_product_attribute`);

ALTER TABLE `ps_cart_rule`
  ADD PRIMARY KEY (`id_cart_rule`), ADD KEY `id_customer` (`id_customer`,`active`,`date_to`), ADD KEY `group_restriction` (`group_restriction`,`active`,`date_to`), ADD KEY `id_customer_2` (`id_customer`,`active`,`highlight`,`date_to`), ADD KEY `group_restriction_2` (`group_restriction`,`active`,`highlight`,`date_to`);

ALTER TABLE `ps_cart_rule_carrier`
  ADD PRIMARY KEY (`id_cart_rule`,`id_carrier`);

ALTER TABLE `ps_cart_rule_combination`
  ADD PRIMARY KEY (`id_cart_rule_1`,`id_cart_rule_2`), ADD KEY `id_cart_rule_1` (`id_cart_rule_1`), ADD KEY `id_cart_rule_2` (`id_cart_rule_2`);

ALTER TABLE `ps_cart_rule_country`
  ADD PRIMARY KEY (`id_cart_rule`,`id_country`);

ALTER TABLE `ps_cart_rule_group`
  ADD PRIMARY KEY (`id_cart_rule`,`id_group`);

ALTER TABLE `ps_cart_rule_lang`
  ADD PRIMARY KEY (`id_cart_rule`,`id_lang`);

ALTER TABLE `ps_cart_rule_product_rule`
  ADD PRIMARY KEY (`id_product_rule`);

ALTER TABLE `ps_cart_rule_product_rule_group`
  ADD PRIMARY KEY (`id_product_rule_group`);

ALTER TABLE `ps_cart_rule_product_rule_value`
  ADD PRIMARY KEY (`id_product_rule`,`id_item`);

ALTER TABLE `ps_cart_rule_shop`
  ADD PRIMARY KEY (`id_cart_rule`,`id_shop`);

ALTER TABLE `ps_category`
  ADD PRIMARY KEY (`id_category`), ADD KEY `category_parent` (`id_parent`), ADD KEY `nleftrightactive` (`nleft`,`nright`,`active`), ADD KEY `level_depth` (`level_depth`), ADD KEY `nright` (`nright`), ADD KEY `activenleft` (`active`,`nleft`), ADD KEY `activenright` (`active`,`nright`);

ALTER TABLE `ps_category_group`
  ADD PRIMARY KEY (`id_category`,`id_group`), ADD KEY `id_category` (`id_category`), ADD KEY `id_group` (`id_group`);

ALTER TABLE `ps_category_lang`
  ADD PRIMARY KEY (`id_category`,`id_shop`,`id_lang`), ADD KEY `category_name` (`name`), ADD KEY `link_rewrite` (`link_rewrite`);

ALTER TABLE `ps_category_product`
  ADD PRIMARY KEY (`id_category`,`id_product`), ADD KEY `id_product` (`id_product`);

ALTER TABLE `ps_category_shop`
  ADD PRIMARY KEY (`id_category`,`id_shop`);

ALTER TABLE `ps_cms`
  ADD PRIMARY KEY (`id_cms`);

ALTER TABLE `ps_cms_block`
  ADD PRIMARY KEY (`id_cms_block`);

ALTER TABLE `ps_cms_block_lang`
  ADD PRIMARY KEY (`id_cms_block`,`id_lang`);

ALTER TABLE `ps_cms_block_page`
  ADD PRIMARY KEY (`id_cms_block_page`);

ALTER TABLE `ps_cms_block_shop`
  ADD PRIMARY KEY (`id_cms_block`,`id_shop`);

ALTER TABLE `ps_cms_category`
  ADD PRIMARY KEY (`id_cms_category`), ADD KEY `category_parent` (`id_parent`);

ALTER TABLE `ps_cms_category_lang`
  ADD PRIMARY KEY (`id_cms_category`,`id_shop`,`id_lang`), ADD KEY `category_name` (`name`), ADD KEY `link_rewrite` (`link_rewrite`);

ALTER TABLE `ps_cms_category_shop`
  ADD PRIMARY KEY (`id_cms_category`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_cms_lang`
  ADD PRIMARY KEY (`id_cms`,`id_shop`,`id_lang`), ADD KEY `link_rewrite` (`link_rewrite`);

ALTER TABLE `ps_cms_role`
  ADD PRIMARY KEY (`id_cms_role`,`id_cms`), ADD UNIQUE KEY `name` (`name`);

ALTER TABLE `ps_cms_role_lang`
  ADD PRIMARY KEY (`id_cms_role`,`id_lang`,`id_shop`);

ALTER TABLE `ps_cms_shop`
  ADD PRIMARY KEY (`id_cms`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_compare`
  ADD PRIMARY KEY (`id_compare`);

ALTER TABLE `ps_compare_product`
  ADD PRIMARY KEY (`id_compare`,`id_product`);

ALTER TABLE `ps_condition`
  ADD PRIMARY KEY (`id_condition`,`id_ps_condition`);

ALTER TABLE `ps_condition_advice`
  ADD PRIMARY KEY (`id_condition`,`id_advice`);

ALTER TABLE `ps_condition_badge`
  ADD PRIMARY KEY (`id_condition`,`id_badge`);

ALTER TABLE `ps_configuration`
  ADD PRIMARY KEY (`id_configuration`), ADD KEY `name` (`name`), ADD KEY `id_shop` (`id_shop`), ADD KEY `id_shop_group` (`id_shop_group`);

ALTER TABLE `ps_configuration_kpi`
  ADD PRIMARY KEY (`id_configuration_kpi`), ADD KEY `name` (`name`), ADD KEY `id_shop` (`id_shop`), ADD KEY `id_shop_group` (`id_shop_group`);

ALTER TABLE `ps_configuration_kpi_lang`
  ADD PRIMARY KEY (`id_configuration_kpi`,`id_lang`);

ALTER TABLE `ps_configuration_lang`
  ADD PRIMARY KEY (`id_configuration`,`id_lang`);

ALTER TABLE `ps_connections`
  ADD PRIMARY KEY (`id_connections`), ADD KEY `id_guest` (`id_guest`), ADD KEY `date_add` (`date_add`), ADD KEY `id_page` (`id_page`);

ALTER TABLE `ps_connections_page`
  ADD PRIMARY KEY (`id_connections`,`id_page`,`time_start`);

ALTER TABLE `ps_connections_source`
  ADD PRIMARY KEY (`id_connections_source`), ADD KEY `connections` (`id_connections`), ADD KEY `orderby` (`date_add`), ADD KEY `http_referer` (`http_referer`), ADD KEY `request_uri` (`request_uri`);

ALTER TABLE `ps_contact`
  ADD PRIMARY KEY (`id_contact`);

ALTER TABLE `ps_contact_lang`
  ADD PRIMARY KEY (`id_contact`,`id_lang`);

ALTER TABLE `ps_contact_shop`
  ADD PRIMARY KEY (`id_contact`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_country`
  ADD PRIMARY KEY (`id_country`), ADD KEY `country_iso_code` (`iso_code`), ADD KEY `country_` (`id_zone`);

ALTER TABLE `ps_country_lang`
  ADD PRIMARY KEY (`id_country`,`id_lang`);

ALTER TABLE `ps_country_shop`
  ADD PRIMARY KEY (`id_country`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_cronjobs`
  ADD PRIMARY KEY (`id_cronjob`), ADD KEY `id_module` (`id_module`);

ALTER TABLE `ps_currency`
  ADD PRIMARY KEY (`id_currency`);

ALTER TABLE `ps_currency_shop`
  ADD PRIMARY KEY (`id_currency`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_customer`
  ADD PRIMARY KEY (`id_customer`), ADD KEY `customer_email` (`email`), ADD KEY `customer_login` (`email`,`passwd`), ADD KEY `id_customer_passwd` (`id_customer`,`passwd`), ADD KEY `id_gender` (`id_gender`), ADD KEY `id_shop_group` (`id_shop_group`), ADD KEY `id_shop` (`id_shop`,`date_add`);

ALTER TABLE `ps_customer_group`
  ADD PRIMARY KEY (`id_customer`,`id_group`), ADD KEY `customer_login` (`id_group`), ADD KEY `id_customer` (`id_customer`);

ALTER TABLE `ps_customer_message`
  ADD PRIMARY KEY (`id_customer_message`), ADD KEY `id_customer_thread` (`id_customer_thread`), ADD KEY `id_employee` (`id_employee`);

ALTER TABLE `ps_customer_message_sync_imap`
  ADD KEY `md5_header_index` (`md5_header`(4));

ALTER TABLE `ps_customer_thread`
  ADD PRIMARY KEY (`id_customer_thread`), ADD KEY `id_shop` (`id_shop`), ADD KEY `id_lang` (`id_lang`), ADD KEY `id_contact` (`id_contact`), ADD KEY `id_customer` (`id_customer`), ADD KEY `id_order` (`id_order`), ADD KEY `id_product` (`id_product`);

ALTER TABLE `ps_customization`
  ADD PRIMARY KEY (`id_customization`,`id_cart`,`id_product`,`id_address_delivery`), ADD KEY `id_product_attribute` (`id_product_attribute`), ADD KEY `id_cart_product` (`id_cart`,`id_product`,`id_product_attribute`);

ALTER TABLE `ps_customization_field`
  ADD PRIMARY KEY (`id_customization_field`), ADD KEY `id_product` (`id_product`);

ALTER TABLE `ps_customization_field_lang`
  ADD PRIMARY KEY (`id_customization_field`,`id_shop`,`id_lang`);

ALTER TABLE `ps_customized_data`
  ADD PRIMARY KEY (`id_customization`,`type`,`index`);

ALTER TABLE `ps_date_range`
  ADD PRIMARY KEY (`id_date_range`);

ALTER TABLE `ps_delivery`
  ADD PRIMARY KEY (`id_delivery`), ADD KEY `id_zone` (`id_zone`), ADD KEY `id_carrier` (`id_carrier`,`id_zone`), ADD KEY `id_range_price` (`id_range_price`), ADD KEY `id_range_weight` (`id_range_weight`);

ALTER TABLE `ps_employee`
  ADD PRIMARY KEY (`id_employee`), ADD KEY `employee_login` (`email`,`passwd`), ADD KEY `id_employee_passwd` (`id_employee`,`passwd`), ADD KEY `id_profile` (`id_profile`);

ALTER TABLE `ps_employee_shop`
  ADD PRIMARY KEY (`id_employee`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_eydpckrprd_config`
  ADD PRIMARY KEY (`id`), ADD KEY `id_product` (`id_product`);

ALTER TABLE `ps_eydpckrprd_delivery_info`
  ADD PRIMARY KEY (`id`), ADD KEY `id_order` (`id_order`);

ALTER TABLE `ps_feature`
  ADD PRIMARY KEY (`id_feature`);

ALTER TABLE `ps_feature_lang`
  ADD PRIMARY KEY (`id_feature`,`id_lang`), ADD KEY `id_lang` (`id_lang`,`name`);

ALTER TABLE `ps_feature_product`
  ADD PRIMARY KEY (`id_feature`,`id_product`), ADD KEY `id_feature_value` (`id_feature_value`), ADD KEY `id_product` (`id_product`);

ALTER TABLE `ps_feature_shop`
  ADD PRIMARY KEY (`id_feature`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_feature_value`
  ADD PRIMARY KEY (`id_feature_value`), ADD KEY `feature` (`id_feature`);

ALTER TABLE `ps_feature_value_lang`
  ADD PRIMARY KEY (`id_feature_value`,`id_lang`);

ALTER TABLE `ps_gender`
  ADD PRIMARY KEY (`id_gender`);

ALTER TABLE `ps_gender_lang`
  ADD PRIMARY KEY (`id_gender`,`id_lang`), ADD KEY `id_gender` (`id_gender`);

ALTER TABLE `ps_group`
  ADD PRIMARY KEY (`id_group`);

ALTER TABLE `ps_group_lang`
  ADD PRIMARY KEY (`id_group`,`id_lang`);

ALTER TABLE `ps_group_reduction`
  ADD PRIMARY KEY (`id_group_reduction`), ADD UNIQUE KEY `id_group` (`id_group`,`id_category`);

ALTER TABLE `ps_group_shop`
  ADD PRIMARY KEY (`id_group`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_guest`
  ADD PRIMARY KEY (`id_guest`), ADD KEY `id_customer` (`id_customer`), ADD KEY `id_operating_system` (`id_operating_system`), ADD KEY `id_web_browser` (`id_web_browser`);

ALTER TABLE `ps_homeslider`
  ADD PRIMARY KEY (`id_homeslider_slides`,`id_shop`);

ALTER TABLE `ps_homeslider_slides`
  ADD PRIMARY KEY (`id_homeslider_slides`);

ALTER TABLE `ps_homeslider_slides_lang`
  ADD PRIMARY KEY (`id_homeslider_slides`,`id_lang`);

ALTER TABLE `ps_hook`
  ADD PRIMARY KEY (`id_hook`), ADD UNIQUE KEY `hook_name` (`name`);

ALTER TABLE `ps_hook_alias`
  ADD PRIMARY KEY (`id_hook_alias`), ADD UNIQUE KEY `alias` (`alias`);

ALTER TABLE `ps_hook_module`
  ADD PRIMARY KEY (`id_module`,`id_hook`,`id_shop`), ADD KEY `id_hook` (`id_hook`), ADD KEY `id_module` (`id_module`), ADD KEY `position` (`id_shop`,`position`);

ALTER TABLE `ps_hook_module_exceptions`
  ADD PRIMARY KEY (`id_hook_module_exceptions`), ADD KEY `id_module` (`id_module`), ADD KEY `id_hook` (`id_hook`);

ALTER TABLE `ps_image`
  ADD PRIMARY KEY (`id_image`), ADD UNIQUE KEY `idx_product_image` (`id_image`,`id_product`,`cover`), ADD UNIQUE KEY `id_product_cover` (`id_product`,`cover`), ADD KEY `image_product` (`id_product`);

ALTER TABLE `ps_image_lang`
  ADD PRIMARY KEY (`id_image`,`id_lang`), ADD KEY `id_image` (`id_image`);

ALTER TABLE `ps_image_shop`
  ADD PRIMARY KEY (`id_image`,`id_shop`), ADD UNIQUE KEY `id_product` (`id_product`,`id_shop`,`cover`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_image_type`
  ADD PRIMARY KEY (`id_image_type`), ADD KEY `image_type_name` (`name`);

ALTER TABLE `ps_import_match`
  ADD PRIMARY KEY (`id_import_match`);

ALTER TABLE `ps_info`
  ADD PRIMARY KEY (`id_info`);

ALTER TABLE `ps_info_lang`
  ADD PRIMARY KEY (`id_info`,`id_lang`);

ALTER TABLE `ps_lang`
  ADD PRIMARY KEY (`id_lang`), ADD KEY `lang_iso_code` (`iso_code`);

ALTER TABLE `ps_lang_shop`
  ADD PRIMARY KEY (`id_lang`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_layered_category`
  ADD PRIMARY KEY (`id_layered_category`), ADD KEY `id_category` (`id_category`,`type`);

ALTER TABLE `ps_layered_filter`
  ADD PRIMARY KEY (`id_layered_filter`);

ALTER TABLE `ps_layered_filter_shop`
  ADD PRIMARY KEY (`id_layered_filter`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_layered_friendly_url`
  ADD PRIMARY KEY (`id_layered_friendly_url`), ADD KEY `id_lang` (`id_lang`), ADD KEY `url_key` (`url_key`(5));

ALTER TABLE `ps_layered_indexable_attribute_group`
  ADD PRIMARY KEY (`id_attribute_group`);

ALTER TABLE `ps_layered_indexable_attribute_group_lang_value`
  ADD PRIMARY KEY (`id_attribute_group`,`id_lang`);

ALTER TABLE `ps_layered_indexable_attribute_lang_value`
  ADD PRIMARY KEY (`id_attribute`,`id_lang`);

ALTER TABLE `ps_layered_indexable_feature`
  ADD PRIMARY KEY (`id_feature`);

ALTER TABLE `ps_layered_indexable_feature_lang_value`
  ADD PRIMARY KEY (`id_feature`,`id_lang`);

ALTER TABLE `ps_layered_indexable_feature_value_lang_value`
  ADD PRIMARY KEY (`id_feature_value`,`id_lang`);

ALTER TABLE `ps_layered_price_index`
  ADD PRIMARY KEY (`id_product`,`id_currency`,`id_shop`), ADD KEY `id_currency` (`id_currency`), ADD KEY `price_min` (`price_min`), ADD KEY `price_max` (`price_max`);

ALTER TABLE `ps_layered_product_attribute`
  ADD PRIMARY KEY (`id_attribute`,`id_product`,`id_shop`), ADD UNIQUE KEY `id_attribute_group` (`id_attribute_group`,`id_attribute`,`id_product`,`id_shop`);

ALTER TABLE `ps_linksmenutop`
  ADD PRIMARY KEY (`id_linksmenutop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_linksmenutop_lang`
  ADD KEY `id_linksmenutop` (`id_linksmenutop`,`id_lang`,`id_shop`);

ALTER TABLE `ps_log`
  ADD PRIMARY KEY (`id_log`);

ALTER TABLE `ps_loyalty`
  ADD PRIMARY KEY (`id_loyalty`), ADD KEY `index_loyalty_loyalty_state` (`id_loyalty_state`), ADD KEY `index_loyalty_order` (`id_order`), ADD KEY `index_loyalty_discount` (`id_cart_rule`), ADD KEY `index_loyalty_customer` (`id_customer`);

ALTER TABLE `ps_loyalty_history`
  ADD PRIMARY KEY (`id_loyalty_history`), ADD KEY `index_loyalty_history_loyalty` (`id_loyalty`), ADD KEY `index_loyalty_history_loyalty_state` (`id_loyalty_state`);

ALTER TABLE `ps_loyalty_state`
  ADD PRIMARY KEY (`id_loyalty_state`), ADD KEY `index_loyalty_state_order_state` (`id_order_state`);

ALTER TABLE `ps_loyalty_state_lang`
  ADD UNIQUE KEY `index_unique_loyalty_state_lang` (`id_loyalty_state`,`id_lang`);

ALTER TABLE `ps_mail`
  ADD PRIMARY KEY (`id_mail`), ADD KEY `recipient` (`recipient`(10));

ALTER TABLE `ps_manufacturer`
  ADD PRIMARY KEY (`id_manufacturer`);

ALTER TABLE `ps_manufacturer_lang`
  ADD PRIMARY KEY (`id_manufacturer`,`id_lang`);

ALTER TABLE `ps_manufacturer_shop`
  ADD PRIMARY KEY (`id_manufacturer`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_memcached_servers`
  ADD PRIMARY KEY (`id_memcached_server`);

ALTER TABLE `ps_message`
  ADD PRIMARY KEY (`id_message`), ADD KEY `message_order` (`id_order`), ADD KEY `id_cart` (`id_cart`), ADD KEY `id_customer` (`id_customer`), ADD KEY `id_employee` (`id_employee`);

ALTER TABLE `ps_message_readed`
  ADD PRIMARY KEY (`id_message`,`id_employee`);

ALTER TABLE `ps_meta`
  ADD PRIMARY KEY (`id_meta`), ADD UNIQUE KEY `page` (`page`);

ALTER TABLE `ps_meta_lang`
  ADD PRIMARY KEY (`id_meta`,`id_shop`,`id_lang`), ADD KEY `id_shop` (`id_shop`), ADD KEY `id_lang` (`id_lang`);

ALTER TABLE `ps_module`
  ADD PRIMARY KEY (`id_module`), ADD KEY `name` (`name`);

ALTER TABLE `ps_modules_perfs`
  ADD PRIMARY KEY (`id_modules_perfs`), ADD KEY `session` (`session`);

ALTER TABLE `ps_module_access`
  ADD PRIMARY KEY (`id_profile`,`id_module`);

ALTER TABLE `ps_module_country`
  ADD PRIMARY KEY (`id_module`,`id_shop`,`id_country`);

ALTER TABLE `ps_module_currency`
  ADD PRIMARY KEY (`id_module`,`id_shop`,`id_currency`), ADD KEY `id_module` (`id_module`);

ALTER TABLE `ps_module_group`
  ADD PRIMARY KEY (`id_module`,`id_shop`,`id_group`);

ALTER TABLE `ps_module_preference`
  ADD PRIMARY KEY (`id_module_preference`), ADD UNIQUE KEY `employee_module` (`id_employee`,`module`);

ALTER TABLE `ps_module_shop`
  ADD PRIMARY KEY (`id_module`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_newsletter`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `ps_operating_system`
  ADD PRIMARY KEY (`id_operating_system`);

ALTER TABLE `ps_orders`
  ADD PRIMARY KEY (`id_order`), ADD KEY `reference` (`reference`), ADD KEY `id_customer` (`id_customer`), ADD KEY `id_cart` (`id_cart`), ADD KEY `invoice_number` (`invoice_number`), ADD KEY `id_carrier` (`id_carrier`), ADD KEY `id_lang` (`id_lang`), ADD KEY `id_currency` (`id_currency`), ADD KEY `id_address_delivery` (`id_address_delivery`), ADD KEY `id_address_invoice` (`id_address_invoice`), ADD KEY `id_shop_group` (`id_shop_group`), ADD KEY `current_state` (`current_state`), ADD KEY `id_shop` (`id_shop`), ADD KEY `date_add` (`date_add`);

ALTER TABLE `ps_order_carrier`
  ADD PRIMARY KEY (`id_order_carrier`), ADD KEY `id_order` (`id_order`), ADD KEY `id_carrier` (`id_carrier`), ADD KEY `id_order_invoice` (`id_order_invoice`);

ALTER TABLE `ps_order_cart_rule`
  ADD PRIMARY KEY (`id_order_cart_rule`), ADD KEY `id_order` (`id_order`), ADD KEY `id_cart_rule` (`id_cart_rule`);

ALTER TABLE `ps_order_detail`
  ADD PRIMARY KEY (`id_order_detail`), ADD KEY `order_detail_order` (`id_order`), ADD KEY `product_id` (`product_id`), ADD KEY `product_attribute_id` (`product_attribute_id`), ADD KEY `id_tax_rules_group` (`id_tax_rules_group`), ADD KEY `id_order_id_order_detail` (`id_order`,`id_order_detail`);

ALTER TABLE `ps_order_detail_tax`
  ADD KEY `id_order_detail` (`id_order_detail`), ADD KEY `id_tax` (`id_tax`);

ALTER TABLE `ps_order_history`
  ADD PRIMARY KEY (`id_order_history`), ADD KEY `order_history_order` (`id_order`), ADD KEY `id_employee` (`id_employee`), ADD KEY `id_order_state` (`id_order_state`);

ALTER TABLE `ps_order_invoice`
  ADD PRIMARY KEY (`id_order_invoice`), ADD KEY `id_order` (`id_order`);

ALTER TABLE `ps_order_invoice_payment`
  ADD PRIMARY KEY (`id_order_invoice`,`id_order_payment`), ADD KEY `order_payment` (`id_order_payment`), ADD KEY `id_order` (`id_order`);

ALTER TABLE `ps_order_invoice_tax`
  ADD KEY `id_tax` (`id_tax`);

ALTER TABLE `ps_order_message`
  ADD PRIMARY KEY (`id_order_message`);

ALTER TABLE `ps_order_message_lang`
  ADD PRIMARY KEY (`id_order_message`,`id_lang`);

ALTER TABLE `ps_order_payment`
  ADD PRIMARY KEY (`id_order_payment`), ADD KEY `order_reference` (`order_reference`);

ALTER TABLE `ps_order_return`
  ADD PRIMARY KEY (`id_order_return`), ADD KEY `order_return_customer` (`id_customer`), ADD KEY `id_order` (`id_order`);

ALTER TABLE `ps_order_return_detail`
  ADD PRIMARY KEY (`id_order_return`,`id_order_detail`,`id_customization`);

ALTER TABLE `ps_order_return_state`
  ADD PRIMARY KEY (`id_order_return_state`);

ALTER TABLE `ps_order_return_state_lang`
  ADD PRIMARY KEY (`id_order_return_state`,`id_lang`);

ALTER TABLE `ps_order_slip`
  ADD PRIMARY KEY (`id_order_slip`), ADD KEY `order_slip_customer` (`id_customer`), ADD KEY `id_order` (`id_order`);

ALTER TABLE `ps_order_slip_detail`
  ADD PRIMARY KEY (`id_order_slip`,`id_order_detail`);

ALTER TABLE `ps_order_slip_detail_tax`
  ADD KEY `id_order_slip_detail` (`id_order_slip_detail`), ADD KEY `id_tax` (`id_tax`);

ALTER TABLE `ps_order_state`
  ADD PRIMARY KEY (`id_order_state`), ADD KEY `module_name` (`module_name`);

ALTER TABLE `ps_order_state_lang`
  ADD PRIMARY KEY (`id_order_state`,`id_lang`);

ALTER TABLE `ps_pack`
  ADD PRIMARY KEY (`id_product_pack`,`id_product_item`,`id_product_attribute_item`), ADD KEY `product_item` (`id_product_item`,`id_product_attribute_item`);

ALTER TABLE `ps_page`
  ADD PRIMARY KEY (`id_page`), ADD KEY `id_page_type` (`id_page_type`), ADD KEY `id_object` (`id_object`);

ALTER TABLE `ps_pagenotfound`
  ADD PRIMARY KEY (`id_pagenotfound`), ADD KEY `date_add` (`date_add`);

ALTER TABLE `ps_page_type`
  ADD PRIMARY KEY (`id_page_type`), ADD KEY `name` (`name`);

ALTER TABLE `ps_page_viewed`
  ADD PRIMARY KEY (`id_page`,`id_date_range`,`id_shop`);

ALTER TABLE `ps_paypal_capture`
  ADD PRIMARY KEY (`id_paypal_capture`);

ALTER TABLE `ps_paypal_customer`
  ADD PRIMARY KEY (`id_paypal_customer`);

ALTER TABLE `ps_paypal_login_user`
  ADD PRIMARY KEY (`id_paypal_login_user`);

ALTER TABLE `ps_paypal_order`
  ADD PRIMARY KEY (`id_order`);

ALTER TABLE `ps_product`
  ADD PRIMARY KEY (`id_product`), ADD KEY `product_supplier` (`id_supplier`), ADD KEY `id_category_default` (`id_category_default`), ADD KEY `indexed` (`indexed`), ADD KEY `date_add` (`date_add`), ADD KEY `product_manufacturer` (`id_manufacturer`,`id_product`);

ALTER TABLE `ps_product_attachment`
  ADD PRIMARY KEY (`id_product`,`id_attachment`);

ALTER TABLE `ps_product_attribute`
  ADD PRIMARY KEY (`id_product_attribute`), ADD UNIQUE KEY `product_default` (`id_product`,`default_on`), ADD KEY `product_attribute_product` (`id_product`), ADD KEY `reference` (`reference`), ADD KEY `supplier_reference` (`supplier_reference`), ADD KEY `id_product_id_product_attribute` (`id_product_attribute`,`id_product`);

ALTER TABLE `ps_product_attribute_combination`
  ADD PRIMARY KEY (`id_attribute`,`id_product_attribute`), ADD KEY `id_product_attribute` (`id_product_attribute`);

ALTER TABLE `ps_product_attribute_image`
  ADD PRIMARY KEY (`id_product_attribute`,`id_image`), ADD KEY `id_image` (`id_image`);

ALTER TABLE `ps_product_attribute_shop`
  ADD PRIMARY KEY (`id_product_attribute`,`id_shop`), ADD UNIQUE KEY `id_product` (`id_product`,`id_shop`,`default_on`);

ALTER TABLE `ps_product_carrier`
  ADD PRIMARY KEY (`id_product`,`id_carrier_reference`,`id_shop`);

ALTER TABLE `ps_product_comment`
  ADD PRIMARY KEY (`id_product_comment`), ADD KEY `id_product` (`id_product`), ADD KEY `id_customer` (`id_customer`), ADD KEY `id_guest` (`id_guest`);

ALTER TABLE `ps_product_comment_criterion`
  ADD PRIMARY KEY (`id_product_comment_criterion`);

ALTER TABLE `ps_product_comment_criterion_category`
  ADD PRIMARY KEY (`id_product_comment_criterion`,`id_category`), ADD KEY `id_category` (`id_category`);

ALTER TABLE `ps_product_comment_criterion_lang`
  ADD PRIMARY KEY (`id_product_comment_criterion`,`id_lang`);

ALTER TABLE `ps_product_comment_criterion_product`
  ADD PRIMARY KEY (`id_product`,`id_product_comment_criterion`), ADD KEY `id_product_comment_criterion` (`id_product_comment_criterion`);

ALTER TABLE `ps_product_comment_grade`
  ADD PRIMARY KEY (`id_product_comment`,`id_product_comment_criterion`), ADD KEY `id_product_comment_criterion` (`id_product_comment_criterion`);

ALTER TABLE `ps_product_comment_report`
  ADD PRIMARY KEY (`id_product_comment`,`id_customer`);

ALTER TABLE `ps_product_comment_usefulness`
  ADD PRIMARY KEY (`id_product_comment`,`id_customer`);

ALTER TABLE `ps_product_country_tax`
  ADD PRIMARY KEY (`id_product`,`id_country`);

ALTER TABLE `ps_product_download`
  ADD PRIMARY KEY (`id_product_download`), ADD UNIQUE KEY `id_product` (`id_product`), ADD KEY `product_active` (`id_product`,`active`);

ALTER TABLE `ps_product_group_reduction_cache`
  ADD PRIMARY KEY (`id_product`,`id_group`);

ALTER TABLE `ps_product_lang`
  ADD PRIMARY KEY (`id_product`,`id_shop`,`id_lang`), ADD KEY `id_lang` (`id_lang`), ADD KEY `name` (`name`), ADD KEY `link_rewrite` (`link_rewrite`);

ALTER TABLE `ps_product_sale`
  ADD PRIMARY KEY (`id_product`), ADD KEY `quantity` (`quantity`);

ALTER TABLE `ps_product_shop`
  ADD PRIMARY KEY (`id_product`,`id_shop`), ADD KEY `id_category_default` (`id_category_default`), ADD KEY `date_add` (`date_add`,`active`,`visibility`), ADD KEY `indexed` (`indexed`,`active`,`id_product`);

ALTER TABLE `ps_product_supplier`
  ADD PRIMARY KEY (`id_product_supplier`), ADD UNIQUE KEY `id_product` (`id_product`,`id_product_attribute`,`id_supplier`), ADD KEY `id_supplier` (`id_supplier`,`id_product`);

ALTER TABLE `ps_product_tag`
  ADD PRIMARY KEY (`id_product`,`id_tag`), ADD KEY `id_tag` (`id_tag`), ADD KEY `id_lang` (`id_lang`,`id_tag`);

ALTER TABLE `ps_profile`
  ADD PRIMARY KEY (`id_profile`);

ALTER TABLE `ps_profile_lang`
  ADD PRIMARY KEY (`id_profile`,`id_lang`);

ALTER TABLE `ps_quick_access`
  ADD PRIMARY KEY (`id_quick_access`);

ALTER TABLE `ps_quick_access_lang`
  ADD PRIMARY KEY (`id_quick_access`,`id_lang`);

ALTER TABLE `ps_range_price`
  ADD PRIMARY KEY (`id_range_price`), ADD UNIQUE KEY `id_carrier` (`id_carrier`,`delimiter1`,`delimiter2`);

ALTER TABLE `ps_range_weight`
  ADD PRIMARY KEY (`id_range_weight`), ADD UNIQUE KEY `id_carrier` (`id_carrier`,`delimiter1`,`delimiter2`);

ALTER TABLE `ps_referrer`
  ADD PRIMARY KEY (`id_referrer`);

ALTER TABLE `ps_referrer_cache`
  ADD PRIMARY KEY (`id_connections_source`,`id_referrer`);

ALTER TABLE `ps_referrer_shop`
  ADD PRIMARY KEY (`id_referrer`,`id_shop`);

ALTER TABLE `ps_request_sql`
  ADD PRIMARY KEY (`id_request_sql`);

ALTER TABLE `ps_required_field`
  ADD PRIMARY KEY (`id_required_field`), ADD KEY `object_name` (`object_name`);

ALTER TABLE `ps_restricteddays`
  ADD PRIMARY KEY (`id`), ADD KEY `id_product` (`id_product`);

ALTER TABLE `ps_risk`
  ADD PRIMARY KEY (`id_risk`);

ALTER TABLE `ps_risk_lang`
  ADD PRIMARY KEY (`id_risk`,`id_lang`), ADD KEY `id_risk` (`id_risk`);

ALTER TABLE `ps_scene`
  ADD PRIMARY KEY (`id_scene`);

ALTER TABLE `ps_scene_category`
  ADD PRIMARY KEY (`id_scene`,`id_category`);

ALTER TABLE `ps_scene_lang`
  ADD PRIMARY KEY (`id_scene`,`id_lang`);

ALTER TABLE `ps_scene_products`
  ADD PRIMARY KEY (`id_scene`,`id_product`,`x_axis`,`y_axis`);

ALTER TABLE `ps_scene_shop`
  ADD PRIMARY KEY (`id_scene`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_search_engine`
  ADD PRIMARY KEY (`id_search_engine`);

ALTER TABLE `ps_search_index`
  ADD PRIMARY KEY (`id_word`,`id_product`);

ALTER TABLE `ps_search_word`
  ADD PRIMARY KEY (`id_word`), ADD UNIQUE KEY `id_lang` (`id_lang`,`id_shop`,`word`);

ALTER TABLE `ps_sekeyword`
  ADD PRIMARY KEY (`id_sekeyword`);

ALTER TABLE `ps_shop`
  ADD PRIMARY KEY (`id_shop`), ADD KEY `id_category` (`id_category`), ADD KEY `id_theme` (`id_theme`), ADD KEY `id_shop_group` (`id_shop_group`,`deleted`);

ALTER TABLE `ps_shop_group`
  ADD PRIMARY KEY (`id_shop_group`), ADD KEY `deleted` (`deleted`,`name`);

ALTER TABLE `ps_shop_url`
  ADD PRIMARY KEY (`id_shop_url`), ADD UNIQUE KEY `full_shop_url` (`domain`,`physical_uri`,`virtual_uri`), ADD UNIQUE KEY `full_shop_url_ssl` (`domain_ssl`,`physical_uri`,`virtual_uri`), ADD KEY `id_shop` (`id_shop`,`main`);

ALTER TABLE `ps_smarty_cache`
  ADD PRIMARY KEY (`id_smarty_cache`), ADD KEY `name` (`name`), ADD KEY `cache_id` (`cache_id`), ADD KEY `modified` (`modified`);

ALTER TABLE `ps_smarty_last_flush`
  ADD PRIMARY KEY (`type`);

ALTER TABLE `ps_smarty_lazy_cache`
  ADD PRIMARY KEY (`template_hash`,`cache_id`,`compile_id`);

ALTER TABLE `ps_specific_price`
  ADD PRIMARY KEY (`id_specific_price`), ADD UNIQUE KEY `id_product_2` (`id_product`,`id_shop`,`id_shop_group`,`id_currency`,`id_country`,`id_group`,`id_customer`,`id_product_attribute`,`from_quantity`,`id_specific_price_rule`,`from`,`to`), ADD KEY `id_product` (`id_product`,`id_shop`,`id_currency`,`id_country`,`id_group`,`id_customer`,`from_quantity`,`from`,`to`), ADD KEY `from_quantity` (`from_quantity`), ADD KEY `id_specific_price_rule` (`id_specific_price_rule`), ADD KEY `id_cart` (`id_cart`);

ALTER TABLE `ps_specific_price_priority`
  ADD PRIMARY KEY (`id_specific_price_priority`,`id_product`), ADD UNIQUE KEY `id_product` (`id_product`);

ALTER TABLE `ps_specific_price_rule`
  ADD PRIMARY KEY (`id_specific_price_rule`), ADD KEY `id_product` (`id_shop`,`id_currency`,`id_country`,`id_group`,`from_quantity`,`from`,`to`);

ALTER TABLE `ps_specific_price_rule_condition`
  ADD PRIMARY KEY (`id_specific_price_rule_condition`), ADD KEY `id_specific_price_rule_condition_group` (`id_specific_price_rule_condition_group`);

ALTER TABLE `ps_specific_price_rule_condition_group`
  ADD PRIMARY KEY (`id_specific_price_rule_condition_group`,`id_specific_price_rule`);

ALTER TABLE `ps_state`
  ADD PRIMARY KEY (`id_state`), ADD KEY `id_country` (`id_country`), ADD KEY `name` (`name`), ADD KEY `id_zone` (`id_zone`);

ALTER TABLE `ps_statssearch`
  ADD PRIMARY KEY (`id_statssearch`);

ALTER TABLE `ps_stock`
  ADD PRIMARY KEY (`id_stock`), ADD KEY `id_warehouse` (`id_warehouse`), ADD KEY `id_product` (`id_product`), ADD KEY `id_product_attribute` (`id_product_attribute`);

ALTER TABLE `ps_stock_available`
  ADD PRIMARY KEY (`id_stock_available`), ADD UNIQUE KEY `product_sqlstock` (`id_product`,`id_product_attribute`,`id_shop`,`id_shop_group`), ADD KEY `id_shop` (`id_shop`), ADD KEY `id_shop_group` (`id_shop_group`), ADD KEY `id_product` (`id_product`), ADD KEY `id_product_attribute` (`id_product_attribute`);

ALTER TABLE `ps_stock_mvt`
  ADD PRIMARY KEY (`id_stock_mvt`), ADD KEY `id_stock` (`id_stock`), ADD KEY `id_stock_mvt_reason` (`id_stock_mvt_reason`);

ALTER TABLE `ps_stock_mvt_reason`
  ADD PRIMARY KEY (`id_stock_mvt_reason`);

ALTER TABLE `ps_stock_mvt_reason_lang`
  ADD PRIMARY KEY (`id_stock_mvt_reason`,`id_lang`);

ALTER TABLE `ps_store`
  ADD PRIMARY KEY (`id_store`);

ALTER TABLE `ps_store_shop`
  ADD PRIMARY KEY (`id_store`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_supplier`
  ADD PRIMARY KEY (`id_supplier`);

ALTER TABLE `ps_supplier_lang`
  ADD PRIMARY KEY (`id_supplier`,`id_lang`);

ALTER TABLE `ps_supplier_shop`
  ADD PRIMARY KEY (`id_supplier`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_supply_order`
  ADD PRIMARY KEY (`id_supply_order`), ADD KEY `id_supplier` (`id_supplier`), ADD KEY `id_warehouse` (`id_warehouse`), ADD KEY `reference` (`reference`);

ALTER TABLE `ps_supply_order_detail`
  ADD PRIMARY KEY (`id_supply_order_detail`), ADD KEY `id_product_attribute` (`id_product_attribute`), ADD KEY `id_product_product_attribute` (`id_product`,`id_product_attribute`), ADD KEY `id_supply_order` (`id_supply_order`,`id_product`);

ALTER TABLE `ps_supply_order_history`
  ADD PRIMARY KEY (`id_supply_order_history`), ADD KEY `id_supply_order` (`id_supply_order`), ADD KEY `id_employee` (`id_employee`), ADD KEY `id_state` (`id_state`);

ALTER TABLE `ps_supply_order_receipt_history`
  ADD PRIMARY KEY (`id_supply_order_receipt_history`), ADD KEY `id_supply_order_detail` (`id_supply_order_detail`), ADD KEY `id_supply_order_state` (`id_supply_order_state`);

ALTER TABLE `ps_supply_order_state`
  ADD PRIMARY KEY (`id_supply_order_state`);

ALTER TABLE `ps_supply_order_state_lang`
  ADD PRIMARY KEY (`id_supply_order_state`,`id_lang`);

ALTER TABLE `ps_tab`
  ADD PRIMARY KEY (`id_tab`), ADD KEY `class_name` (`class_name`), ADD KEY `id_parent` (`id_parent`);

ALTER TABLE `ps_tab_advice`
  ADD PRIMARY KEY (`id_tab`,`id_advice`);

ALTER TABLE `ps_tab_lang`
  ADD PRIMARY KEY (`id_tab`,`id_lang`);

ALTER TABLE `ps_tab_module_preference`
  ADD PRIMARY KEY (`id_tab_module_preference`), ADD UNIQUE KEY `employee_module` (`id_employee`,`id_tab`,`module`);

ALTER TABLE `ps_tag`
  ADD PRIMARY KEY (`id_tag`), ADD KEY `tag_name` (`name`), ADD KEY `id_lang` (`id_lang`);

ALTER TABLE `ps_tag_count`
  ADD PRIMARY KEY (`id_group`,`id_tag`), ADD KEY `id_group` (`id_group`,`id_lang`,`id_shop`,`counter`);

ALTER TABLE `ps_tax`
  ADD PRIMARY KEY (`id_tax`);

ALTER TABLE `ps_tax_lang`
  ADD PRIMARY KEY (`id_tax`,`id_lang`);

ALTER TABLE `ps_tax_rule`
  ADD PRIMARY KEY (`id_tax_rule`), ADD KEY `id_tax_rules_group` (`id_tax_rules_group`), ADD KEY `id_tax` (`id_tax`), ADD KEY `category_getproducts` (`id_tax_rules_group`,`id_country`,`id_state`,`zipcode_from`);

ALTER TABLE `ps_tax_rules_group`
  ADD PRIMARY KEY (`id_tax_rules_group`);

ALTER TABLE `ps_tax_rules_group_shop`
  ADD PRIMARY KEY (`id_tax_rules_group`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_theme`
  ADD PRIMARY KEY (`id_theme`);

ALTER TABLE `ps_themeconfigurator`
  ADD PRIMARY KEY (`id_item`);

ALTER TABLE `ps_theme_meta`
  ADD PRIMARY KEY (`id_theme_meta`), ADD UNIQUE KEY `id_theme_2` (`id_theme`,`id_meta`), ADD KEY `id_theme` (`id_theme`), ADD KEY `id_meta` (`id_meta`);

ALTER TABLE `ps_theme_specific`
  ADD PRIMARY KEY (`id_theme`,`id_shop`,`entity`,`id_object`);

ALTER TABLE `ps_timezone`
  ADD PRIMARY KEY (`id_timezone`);

ALTER TABLE `ps_warehouse`
  ADD PRIMARY KEY (`id_warehouse`);

ALTER TABLE `ps_warehouse_carrier`
  ADD PRIMARY KEY (`id_warehouse`,`id_carrier`), ADD KEY `id_warehouse` (`id_warehouse`), ADD KEY `id_carrier` (`id_carrier`);

ALTER TABLE `ps_warehouse_product_location`
  ADD PRIMARY KEY (`id_warehouse_product_location`), ADD UNIQUE KEY `id_product` (`id_product`,`id_product_attribute`,`id_warehouse`);

ALTER TABLE `ps_warehouse_shop`
  ADD PRIMARY KEY (`id_warehouse`,`id_shop`), ADD KEY `id_warehouse` (`id_warehouse`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_webservice_account`
  ADD PRIMARY KEY (`id_webservice_account`), ADD KEY `key` (`key`);

ALTER TABLE `ps_webservice_account_shop`
  ADD PRIMARY KEY (`id_webservice_account`,`id_shop`), ADD KEY `id_shop` (`id_shop`);

ALTER TABLE `ps_webservice_permission`
  ADD PRIMARY KEY (`id_webservice_permission`), ADD UNIQUE KEY `resource_2` (`resource`,`method`,`id_webservice_account`), ADD KEY `resource` (`resource`), ADD KEY `method` (`method`), ADD KEY `id_webservice_account` (`id_webservice_account`);

ALTER TABLE `ps_web_browser`
  ADD PRIMARY KEY (`id_web_browser`);

ALTER TABLE `ps_wishlist`
  ADD PRIMARY KEY (`id_wishlist`);

ALTER TABLE `ps_wishlist_product`
  ADD PRIMARY KEY (`id_wishlist_product`);

ALTER TABLE `ps_zone`
  ADD PRIMARY KEY (`id_zone`);

ALTER TABLE `ps_zone_shop`
  ADD PRIMARY KEY (`id_zone`,`id_shop`), ADD KEY `id_shop` (`id_shop`);


ALTER TABLE `ps_address`
  MODIFY `id_address` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
ALTER TABLE `ps_advice`
  MODIFY `id_advice` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=372;
ALTER TABLE `ps_alias`
  MODIFY `id_alias` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
ALTER TABLE `ps_attachment`
  MODIFY `id_attachment` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_attachment_lang`
  MODIFY `id_attachment` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_attribute`
  MODIFY `id_attribute` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
ALTER TABLE `ps_attribute_group`
  MODIFY `id_attribute_group` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
ALTER TABLE `ps_attribute_impact`
  MODIFY `id_attribute_impact` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
ALTER TABLE `ps_availableweekdays`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
ALTER TABLE `ps_badge`
  MODIFY `id_badge` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=231;
ALTER TABLE `ps_bettercustomization`
  MODIFY `id_bettercustomization` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
ALTER TABLE `ps_carrier`
  MODIFY `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
ALTER TABLE `ps_cart`
  MODIFY `id_cart` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=37;
ALTER TABLE `ps_cart_rule`
  MODIFY `id_cart_rule` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_cart_rule_product_rule`
  MODIFY `id_product_rule` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_cart_rule_product_rule_group`
  MODIFY `id_product_rule_group` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_category`
  MODIFY `id_category` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=19;
ALTER TABLE `ps_cms`
  MODIFY `id_cms` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
ALTER TABLE `ps_cms_block`
  MODIFY `id_cms_block` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_cms_block_page`
  MODIFY `id_cms_block_page` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
ALTER TABLE `ps_cms_block_shop`
  MODIFY `id_cms_block` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_cms_category`
  MODIFY `id_cms_category` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_cms_category_shop`
  MODIFY `id_cms_category` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_cms_role`
  MODIFY `id_cms_role` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_compare`
  MODIFY `id_compare` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_condition`
  MODIFY `id_condition` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=237;
ALTER TABLE `ps_configuration`
  MODIFY `id_configuration` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=541;
ALTER TABLE `ps_configuration_kpi`
  MODIFY `id_configuration_kpi` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=51;
ALTER TABLE `ps_connections`
  MODIFY `id_connections` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4621;
ALTER TABLE `ps_connections_source`
  MODIFY `id_connections_source` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=179;
ALTER TABLE `ps_contact`
  MODIFY `id_contact` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
ALTER TABLE `ps_country`
  MODIFY `id_country` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=245;
ALTER TABLE `ps_cronjobs`
  MODIFY `id_cronjob` int(10) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_currency`
  MODIFY `id_currency` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_customer`
  MODIFY `id_customer` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
ALTER TABLE `ps_customer_message`
  MODIFY `id_customer_message` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_customer_thread`
  MODIFY `id_customer_thread` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_customization`
  MODIFY `id_customization` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=29;
ALTER TABLE `ps_customization_field`
  MODIFY `id_customization_field` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=76;
ALTER TABLE `ps_date_range`
  MODIFY `id_date_range` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_delivery`
  MODIFY `id_delivery` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
ALTER TABLE `ps_employee`
  MODIFY `id_employee` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
ALTER TABLE `ps_eydpckrprd_config`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=148;
ALTER TABLE `ps_eydpckrprd_delivery_info`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=27;
ALTER TABLE `ps_feature`
  MODIFY `id_feature` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_feature_value`
  MODIFY `id_feature_value` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_gender`
  MODIFY `id_gender` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
ALTER TABLE `ps_group`
  MODIFY `id_group` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
ALTER TABLE `ps_group_reduction`
  MODIFY `id_group_reduction` mediumint(8) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_guest`
  MODIFY `id_guest` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5058;
ALTER TABLE `ps_homeslider`
  MODIFY `id_homeslider_slides` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
ALTER TABLE `ps_homeslider_slides`
  MODIFY `id_homeslider_slides` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
ALTER TABLE `ps_hook`
  MODIFY `id_hook` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=167;
ALTER TABLE `ps_hook_alias`
  MODIFY `id_hook_alias` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=87;
ALTER TABLE `ps_hook_module_exceptions`
  MODIFY `id_hook_module_exceptions` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_image`
  MODIFY `id_image` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=43;
ALTER TABLE `ps_image_type`
  MODIFY `id_image_type` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=73;
ALTER TABLE `ps_import_match`
  MODIFY `id_import_match` int(10) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_info`
  MODIFY `id_info` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_lang`
  MODIFY `id_lang` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_layered_category`
  MODIFY `id_layered_category` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=34;
ALTER TABLE `ps_layered_filter`
  MODIFY `id_layered_filter` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_layered_friendly_url`
  MODIFY `id_layered_friendly_url` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=162;
ALTER TABLE `ps_linksmenutop`
  MODIFY `id_linksmenutop` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_log`
  MODIFY `id_log` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=130;
ALTER TABLE `ps_loyalty`
  MODIFY `id_loyalty` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_loyalty_history`
  MODIFY `id_loyalty_history` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_loyalty_state`
  MODIFY `id_loyalty_state` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
ALTER TABLE `ps_loyalty_state_lang`
  MODIFY `id_loyalty_state` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
ALTER TABLE `ps_mail`
  MODIFY `id_mail` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=25;
ALTER TABLE `ps_manufacturer`
  MODIFY `id_manufacturer` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_memcached_servers`
  MODIFY `id_memcached_server` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_message`
  MODIFY `id_message` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
ALTER TABLE `ps_meta`
  MODIFY `id_meta` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=38;
ALTER TABLE `ps_module`
  MODIFY `id_module` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=86;
ALTER TABLE `ps_modules_perfs`
  MODIFY `id_modules_perfs` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_module_preference`
  MODIFY `id_module_preference` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_newsletter`
  MODIFY `id` int(6) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_operating_system`
  MODIFY `id_operating_system` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
ALTER TABLE `ps_orders`
  MODIFY `id_order` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_order_carrier`
  MODIFY `id_order_carrier` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_order_cart_rule`
  MODIFY `id_order_cart_rule` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_order_detail`
  MODIFY `id_order_detail` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_order_history`
  MODIFY `id_order_history` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_order_invoice`
  MODIFY `id_order_invoice` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_order_message`
  MODIFY `id_order_message` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_order_payment`
  MODIFY `id_order_payment` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_order_return`
  MODIFY `id_order_return` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_order_return_state`
  MODIFY `id_order_return_state` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
ALTER TABLE `ps_order_slip`
  MODIFY `id_order_slip` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_order_state`
  MODIFY `id_order_state` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=16;
ALTER TABLE `ps_page`
  MODIFY `id_page` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=72;
ALTER TABLE `ps_pagenotfound`
  MODIFY `id_pagenotfound` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2928;
ALTER TABLE `ps_page_type`
  MODIFY `id_page_type` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=23;
ALTER TABLE `ps_paypal_capture`
  MODIFY `id_paypal_capture` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_paypal_customer`
  MODIFY `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_paypal_login_user`
  MODIFY `id_paypal_login_user` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_product`
  MODIFY `id_product` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=44;
ALTER TABLE `ps_product_attribute`
  MODIFY `id_product_attribute` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=170;
ALTER TABLE `ps_product_comment`
  MODIFY `id_product_comment` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_product_comment_criterion`
  MODIFY `id_product_comment_criterion` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_product_download`
  MODIFY `id_product_download` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_product_supplier`
  MODIFY `id_product_supplier` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_profile`
  MODIFY `id_profile` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
ALTER TABLE `ps_quick_access`
  MODIFY `id_quick_access` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
ALTER TABLE `ps_range_price`
  MODIFY `id_range_price` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_range_weight`
  MODIFY `id_range_weight` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_referrer`
  MODIFY `id_referrer` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_referrer_shop`
  MODIFY `id_referrer` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_request_sql`
  MODIFY `id_request_sql` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_required_field`
  MODIFY `id_required_field` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_restricteddays`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_risk`
  MODIFY `id_risk` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
ALTER TABLE `ps_scene`
  MODIFY `id_scene` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_search_engine`
  MODIFY `id_search_engine` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=39;
ALTER TABLE `ps_search_word`
  MODIFY `id_word` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1420;
ALTER TABLE `ps_sekeyword`
  MODIFY `id_sekeyword` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=50;
ALTER TABLE `ps_shop`
  MODIFY `id_shop` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_shop_group`
  MODIFY `id_shop_group` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_shop_url`
  MODIFY `id_shop_url` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_specific_price`
  MODIFY `id_specific_price` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_specific_price_priority`
  MODIFY `id_specific_price_priority` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=132;
ALTER TABLE `ps_specific_price_rule`
  MODIFY `id_specific_price_rule` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_specific_price_rule_condition`
  MODIFY `id_specific_price_rule_condition` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_specific_price_rule_condition_group`
  MODIFY `id_specific_price_rule_condition_group` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_state`
  MODIFY `id_state` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=313;
ALTER TABLE `ps_statssearch`
  MODIFY `id_statssearch` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=16;
ALTER TABLE `ps_stock`
  MODIFY `id_stock` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_stock_available`
  MODIFY `id_stock_available` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=226;
ALTER TABLE `ps_stock_mvt`
  MODIFY `id_stock_mvt` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_stock_mvt_reason`
  MODIFY `id_stock_mvt_reason` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=9;
ALTER TABLE `ps_store`
  MODIFY `id_store` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_supplier`
  MODIFY `id_supplier` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_supply_order`
  MODIFY `id_supply_order` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_supply_order_detail`
  MODIFY `id_supply_order_detail` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_supply_order_history`
  MODIFY `id_supply_order_history` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_supply_order_receipt_history`
  MODIFY `id_supply_order_receipt_history` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_supply_order_state`
  MODIFY `id_supply_order_state` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
ALTER TABLE `ps_tab`
  MODIFY `id_tab` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=110;
ALTER TABLE `ps_tab_module_preference`
  MODIFY `id_tab_module_preference` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_tag`
  MODIFY `id_tag` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
ALTER TABLE `ps_tax`
  MODIFY `id_tax` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_tax_rule`
  MODIFY `id_tax_rule` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_tax_rules_group`
  MODIFY `id_tax_rules_group` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
ALTER TABLE `ps_theme`
  MODIFY `id_theme` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
ALTER TABLE `ps_themeconfigurator`
  MODIFY `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=22;
ALTER TABLE `ps_theme_meta`
  MODIFY `id_theme_meta` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=115;
ALTER TABLE `ps_timezone`
  MODIFY `id_timezone` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=561;
ALTER TABLE `ps_warehouse`
  MODIFY `id_warehouse` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_warehouse_product_location`
  MODIFY `id_warehouse_product_location` int(11) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_webservice_account`
  MODIFY `id_webservice_account` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_webservice_permission`
  MODIFY `id_webservice_permission` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_web_browser`
  MODIFY `id_web_browser` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
ALTER TABLE `ps_wishlist`
  MODIFY `id_wishlist` int(10) unsigned NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_wishlist_product`
  MODIFY `id_wishlist_product` int(10) NOT NULL AUTO_INCREMENT;
ALTER TABLE `ps_zone`
  MODIFY `id_zone` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=9;

Are these really necessary to be run in SQL? Because I could not get it running in the SQL tab under phpmyadmin for my prestashop database.

 

I'm using 10.0.21-MariaDB. Any help would be appreciated. Thank you

 

 

 

Error encountered:

 

Error

SQL query:

ALTER TABLE `ps_access` ADD PRIMARY KEY ( `id_profile` , `id_tab` ) ;
 

MySQL said: dot.gif

#1068 - Multiple primary key defined 

 

 

 

 

 

 

.

Edited by bomby (see edit history)
Link to comment
Share on other sites

The error is telling you that the table already has a primary key defined, and you cannot create a second primary key.

 

Can you show me the create table statement for the ps_access table that you used during the import?  Perhaps the primary key definition was included with the create table, and running these extra alter table commands is not necessary

Link to comment
Share on other sites


 

 

 

CREATE TABLE IF NOT EXISTS `ps_access` (

`id_profile` int(10) unsigned NOT NULL,

`id_tab` int(10) unsigned NOT NULL,

`view` int(11) NOT NULL,

`add` int(11) NOT NULL,

`edit` int(11) NOT NULL,

`delete` int(11) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

 

INSERT INTO `ps_access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) VALUES

(1, 1, 1, 1, 1, 1),

(1, 2, 0, 0, 0, 0),

(1, 3, 0, 0, 0, 0),

(1, 4, 0, 0, 0, 0),

(1, 5, 1, 1, 1, 1),

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...