Repair Foreign Keys läuft nicht durch - Fehlermeldung

Hallo, in eienm Shop habe ich den Fall, dass ich scheinbar das Script Repair Foreign Keys einsetzen muss, damit es beim Update auf die neuste Shopware Version nicht zu Fehlern kommt. Jetzt habe ich aber das Problem, dass das Script nicht durchläuft im PHPMyAdmin des Shops. Ich erhalte nach ca. 15 Sekunden diese Fehlermeldung: SQL-Befehl: -- Add missing foreign key ALTER TABLE `s_article_configurator_template_prices_attributes` ADD FOREIGN KEY ( `template_price_id` ) REFERENCES `s_article_configurator_template_prices` ( `id` ) ON DELETE CASCADE ON UPDATE NO ACTION ; MySQL meldet: Dokumentation #1005 - Can't create table 'd0206f09.#sql-8b8\_9dbed' (errno: 150) (Details...) Ich habe absolut keinen Plan was diese Fehlermeldung zu bedeuten hat. “Cant create table” - verstehe ich nicht - es soll doch gar keine neue Tabelle angelegt werden. Kann mir bitte wer helfen? Gruß kweb

*push* Niemand eine Idee? :confused:

Hallo, die Fehlermeldung ist typisch wenn Mysql/die Serverkonfiguration das Erstellen von temporären Tabellen unterbindet. Der Fehler hat erstmal nichts mit den Foreign Keys oder dem Script an sich zu tun. Du solltest auch keine Tabellen die auf _attributes in der Datenbank haben, die Shopware nicht kennt. Oftmals haben viele Kunden sowas wie bck_xyz_attributes in der Datenbank - also Backup-Tabellen. Die können auch zu solchen Problemen führen. Moritz

[quote=“Moritz Naczenski”]Hallo, die Fehlermeldung ist typisch wenn Mysql/die Serverkonfiguration das Erstellen von temporären Tabellen unterbindet. Der Fehler hat erstmal nichts mit den Foreign Keys oder dem Script an sich zu tun. Du solltest auch keine Tabellen die auf _attributes in der Datenbank haben, die Shopware nicht kennt. Oftmals haben viele Kunden sowas wie bck_xyz_attributes in der Datenbank - also Backup-Tabellen. Die können auch zu solchen Problemen führen. Moritz[/quote] Hallo Moritz, danke für Deine Hilfe. Ich habe tatsächlich eine Tabelle in der Datenbank die heißt: s_article_configurator_template_prices_attributes_backup Die kann ich einfach löschen? Gruß kweb

[quote=“kweb”] danke für Deine Hilfe. Ich habe tatsächlich eine Tabelle in der Datenbank die heißt: s_article_configurator_template_prices_attributes_backup Die kann ich einfach löschen? Gruß kweb[/quote] Si - die wird über das SQL Script angelegt um die Daten “zwischen” zu speichern. Gruß

Also die Backup Tabelle wird erstellt wenn ich versuche das Script auszuführen, was aufgrund des Fehlers nicht durchläuft. Wenn ich die Backup Tabelle lösche hat es leider keinen Einfluss - der Fehler besteht weiterhin. An der Serverkonfiguration liegt es wohl auch nicht. Ich habe 4-5 Shopware Shops auf dem Server liegen und bei anderen Shops läuft das Script ja auch durch. Hier mal eine Auflistung der Tabellen die ich in meiner DB habe. Irgendwas ungewöhlnliches dabei`? s_addon_premiums s_articles s_articles_also_bought_ro s_articles_attributes s_articles_avoid_customergroups s_articles_categories s_articles_categories_ro s_articles_categories_seo s_articles_details s_articles_downloads s_articles_downloads_attributes s_articles_esd s_articles_esd_attributes s_articles_esd_serials s_articles_img s_articles_img_attributes s_articles_information s_articles_information_attributes s_articles_notification s_articles_prices s_articles_prices_attributes s_articles_relationships s_articles_similar s_articles_similar_shown_ro s_articles_supplier s_articles_supplier_attributes s_articles_top_seller_ro s_articles_translations s_articles_vote s_article_configurator_dependencies s_article_configurator_groups s_article_configurator_options s_article_configurator_option_relations s_article_configurator_price_variations s_article_configurator_sets s_article_configurator_set_group_relations s_article_configurator_set_option_relations s_article_configurator_templates s_article_configurator_templates_attributes s_article_configurator_template_prices s_article_configurator_template_prices_attributes s_article_configurator_template_prices_attributes_backup s_article_img_mappings s_article_img_mapping_rules s_billing_template s_blog s_blog_assigned_articles s_blog_attributes s_blog_comments s_blog_media s_blog_tags s_campaigns_articles s_campaigns_banner s_campaigns_containers s_campaigns_groups s_campaigns_html s_campaigns_links s_campaigns_logs s_campaigns_mailaddresses s_campaigns_maildata s_campaigns_mailings s_campaigns_positions s_campaigns_sender s_campaigns_templates s_categories s_categories_attributes s_categories_avoid_customergroups s_cms_static s_cms_static_attributes s_cms_static_groups s_cms_support s_cms_support_attributes s_cms_support_fields s_core_acl_privileges s_core_acl_resources s_core_acl_roles s_core_auth s_core_auth_attributes s_core_auth_roles s_core_config_elements s_core_config_element_translations s_core_config_forms s_core_config_form_translations s_core_config_mails s_core_config_mails_attachments s_core_config_mails_attributes s_core_config_values s_core_countries s_core_countries_areas s_core_countries_attributes s_core_countries_states s_core_countries_states_attributes s_core_currencies s_core_customergroups s_core_customergroups_attributes s_core_customergroups_discounts s_core_customerpricegroups s_core_detail_states s_core_documents s_core_documents_box s_core_engine_elements s_core_engine_groups s_core_licenses s_core_locales s_core_log s_core_menu s_core_optin s_core_paymentmeans s_core_paymentmeans_attributes s_core_paymentmeans_countries s_core_paymentmeans_subshops s_core_payment_data s_core_payment_instance s_core_plugins s_core_plugin_categories s_core_pricegroups s_core_pricegroups_discounts s_core_rewrite_urls s_core_rulesets s_core_sessions s_core_sessions_backend s_core_shops s_core_shop_currencies s_core_shop_pages s_core_snippets s_core_states s_core_subscribes s_core_tax s_core_tax_rules s_core_templates s_core_templates_config_elements s_core_templates_config_layout s_core_templates_config_set s_core_templates_config_values s_core_theme_settings s_core_translations s_core_units s_core_widgets s_core_widget_views s_crontab s_emarketing_banners s_emarketing_banners_attributes s_emarketing_banners_statistics s_emarketing_lastarticles s_emarketing_partner s_emarketing_referer s_emarketing_tellafriend s_emarketing_vouchers s_emarketing_vouchers_attributes s_emarketing_voucher_codes s_emotion s_emotion_attributes s_emotion_categories s_emotion_element s_emotion_element_value s_emotion_grid s_emotion_templates s_es_backlog s_export s_export_articles s_export_attributes s_export_categories s_export_suppliers s_filter s_filter_articles s_filter_attributes s_filter_options s_filter_relations s_filter_values s_library_component s_library_component_field s_media s_media_album s_media_album_settings s_media_association s_media_attributes s_multi_edit_backup s_multi_edit_filter s_multi_edit_queue s_multi_edit_queue_articles s_order s_order_attributes s_order_basket s_order_basket_attributes s_order_billingaddress s_order_billingaddress_attributes s_order_comparisons s_order_details s_order_details_attributes s_order_documents s_order_documents_attributes s_order_esd s_order_history s_order_notes s_order_number s_order_shippingaddress s_order_shippingaddress_attributes s_plugin_customizing_articles s_plugin_customizing_charge_items s_plugin_customizing_charge_values s_plugin_customizing_groups s_plugin_customizing_options s_plugin_customizing_types s_plugin_customizing_values s_plugin_recommendations s_plugin_widgets_notes s_premium_dispatch s_premium_dispatch_attributes s_premium_dispatch_categories s_premium_dispatch_countries s_premium_dispatch_holidays s_premium_dispatch_paymentmeans s_premium_holidays s_premium_shippingcosts s_product_streams s_product_streams_articles s_product_streams_selection s_schema_version s_search_fields s_search_index s_search_keywords s_search_tables s_statistics_article_impression s_statistics_currentusers s_statistics_pool s_statistics_referer s_statistics_search s_statistics_visitors s_user s_user_attributes s_user_billingaddress s_user_billingaddress_attributes s_user_debit s_user_shippingaddress s_user_shippingaddress_attributes Wäre wirklich über jede Hilfe sehr dankbar. Gruß kweb

Kannst Du bitte mal folgende SQLs ausführen und die Rückgaben hier posten: DESCRIBE s\_article\_configurator\_template\_prices; DESCRIBE s\_article\_configurator\_template\_prices\_attributes; Gruß

Die Abfragen musst Du einzeln ausführen sonst bekommst Du die Rückgabe nicht angezeigt. Bei mir sieht diese z.B. so aus: +--------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------------+------------------+------+-----+---------+----------------+ | id | int(11) unsigned | NO | PRI | NULL | auto\_increment | | template\_id | int(10) unsigned | YES | MUL | NULL | | | customer\_group\_key | varchar(30) | NO | MUL | NULL | | | from | int(10) unsigned | NO | | NULL | | | to | varchar(30) | NO | | NULL | | | price | double | NO | | 0 | | | pseudoprice | double | YES | | NULL | | | baseprice | double | YES | | NULL | | | percent | decimal(10,2) | YES | | NULL | | +--------------------+------------------+------+-----+---------+----------------+ 9 rows in set (0,00 sec)

Hi, sorry :confused: Hier für die prices: und hier für die prices_attributes

Sehen diese Tabellen unterschiedlich aus zu denen aus den anderen Shops wo das script funktioniert?

[quote=„Thomas“]Sehen diese Tabellen unterschiedlich aus zu denen aus den anderen Shops wo das script funktioniert?[/quote] Nein, alles identisch :cry: Oh man das kann doch nicht wahr sein :confused: Welche Möglichkeiten gibt es noch?!