SW6 Installationsfehler beim Import der Datenbank

Hallo zusammen,

beim versuch eine Test-Installation von SW6 auf meinen Host einzurichten, kommt es beim Importieren der Datenbank zu nachfolgenden Feler: 

 

Error
Received an error message.
URL: importDatabase
Message: Internal Server Error

Please try to fix this error and restart the update.
Response
{"valid":false,"errorMsg":"An exception occurred while executing '\n CREATE TABLE `custom_field` (\n `id` BINARY(16) NOT NULL PRIMARY KEY,\n `name` VARCHAR(255) NOT NULL,\n `type` VARCHAR(255) NOT NULL,\n `config` JSON NULL,\n `active` TINYINT(1) NOT NULL DEFAULT 1,\n `set_id` BINARY(16) NULL,\n `created_at` DATETIME(3) NOT NULL,\n `updated_at` DATETIME(3) NULL,\n CONSTRAINT `uniq.custom_field.name` UNIQUE (`name`),\n CONSTRAINT `json.custom_field.config` CHECK(JSON_VALID(`config`)),\n CONSTRAINT `fk.custom_field.set_id` FOREIGN KEY (set_id)\n REFERENCES `custom_field_set` (id) ON UPDATE CASCADE ON DELETE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n ':\n\nSQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint"}

Dieser Fehler tritt im “Datenbank Installation: Schritt 70 von 250” auf.

Laut System erfülle ich alle Systemvoraussetzungen.

MySQL Version: 5.7
PHP Version: 7.3.5

 

 

Wie bekomm ich das nun zum laufen? Lokal bekomme ich es nämlich ebenfalls (jedoch aus anderen Gründen) nicht zum laufen.

https://issues.shopware.com/issues/NEXT-4072?_ga=2.42973349.1256526625.1562875771-2035421451.1562254622

könnte damit zusammenhängen 

1 Like

hilft nicht weiter

 

  

Type: Doctrine\DBAL\DBALException

Message: An exception occurred while executing 'INSERT IGNORE INTO migration (class, creation_timestamp) VALUES (‘Shopware\Core\Migration\Migration1536232600Language’,‘1536232600’), (‘Shopware\Core\Migration\Migration1536232610Locale’,‘1536232610’), (‘Shopware\Core\Migration\Migration1536232620SalesChannelType’,‘1536232620’), (‘Shopware\Core\Migration\Migration1536232630PropertyGroup’,‘1536232630’), (‘Shopware\Core\Migration\Migration1536232640Currency’,‘1536232640’), (‘Shopware\Core\Migration\Migration1536232650CustomerGroup’,‘1536232650’),

Migration\Migration1536233090MediaThumbnail’,‘1536233090’), (‘Shopware\Core\Migration\Migration1536233100PropertyGroupOption’,‘1536233100’), (‘Shopware\Core\Migration\Migration1536233110ProductManufacturer’,‘1536233110’), (‘Shopware\Core\Migration\Migration1536233120Product’,‘1536233120’), (‘Shopware\Core\Migration\Migration1536233130ProductMedia’,‘1536233130’), (‘Shopware\Core\Migration\Migration1536233140ProductProperty’,‘1536233140’), (‘Shopware\Core\Migration\Migration1536233150ProductOption’,‘1536233150’), (‘Shopware\Core\Migration\Migration1536233160ProductConfigurator’,‘1536233160’), (‘Shopware\Core\Migration\Migration1536233170ProductCategoryTree’,‘1536233170’), (‘Shopware\Core\Migration\Migration1536233180ProductCategory’,‘1536233180’), (‘Shopware\Core\Migration\Migration1536233190ProductPriceRule’,‘1536233190’), (‘Shopware\Core\Migration\Migration1536233200RuleCondition’,‘1536233200’), (‘Shopware\Core\Migration\Migration1536233210SalesChannelDomain’,‘1536233210’), (‘Shopware\Core\Migration\Migration1536233220PluginTranslation’,‘1536233220’), (‘Shopware\Core\Migration\Migration1536233230ProductStream’,‘1536233230’), (‘Shopware\Core\Migration\Migration1536233240ProductStreamFilter’,‘1536233240’), (‘Shopware\Core\Migration\Migration1536233250MessageQueueStats’,‘1536233250’), (‘Shopware\Core\Migration\Migration1536233260StateMachineHistory’,‘1536233260’), (‘Shopware\Core\Migration\Migration1536233270SystemConfig’,‘1536233270’), (‘Shopware\Core\Migration\Migration1536233280CustomFieldSet’,‘1536233280’), (‘Shopware\Core\Migration\Migration1536233290CustomFieldSetRelation’,‘1536233290’), (‘Shopware\Core\Migration\Migration1536233300CustomField’,‘1536233300’), (‘Shopware\Core\Migration\Migration1536233310ScheduledTask’,‘1536233310’), (‘Shopware\Core\Migration\Migration1536233320DeadMessage’,‘1536233320’), (‘Shopware\Core\Migration\Migration1536233330MailTemplate’,‘1536233330’), (‘Shopware\Core\Migration\Migration1536233340NumberRange’,‘1536233340’), (‘Shopware\Core\Migration\Migration1536233350ProductVisibility’,‘1536233350’), (‘Shopware\Core\Migration\Migration1536233360Document’,‘1536233360’), (‘Shopware\Core\Migration\Migration1536233370EventAction’,‘1536233370’), (‘Shopware\Core\Migration\Migration1536233380UserRecovery’,‘1536233380’), (‘Shopware\Core\Migration\Migration1536233390Promotion’,‘1536233390’), (‘Shopware\Core\Migration\Migration1536233400MailTemplateMedia’,‘1536233400’), (‘Shopware\Core\Migration\Migration1536233410PromotionSalesChannel’,‘1536233410’), (‘Shopware\Core\Migration\Migration1536233420PromotionDiscount’,‘1536233420’), (‘Shopware\Core\Migration\Migration1536233430NewsletterRecipient’,‘1536233430’), (‘Shopware\Core\Migration\Migration1536233440PromotionPersonaCustomer’,‘1536233440’), (‘Shopware\Core\Migration\Migration1536233450PromotionPersonaRules’,‘1536233450’), (‘Shopware\Core\Migration\Migration1536233460NumberRangeTranslationAndConfiguration’,‘1536233460’), (‘Shopware\Core\Migration\Migration1536233470PromotionOrderRule’,‘1536233470’), (‘Shopware\Core\Migration\Migration1536233480SalesChannelApiContext’,‘1536233480’), (‘Shopware\Core\Migration\Migration1536233500PromotionDiscountRule’,‘1536233500’), (‘Shopware\Core\Migration\Migration1536233510DocumentConfiguration’,‘1536233510’), (‘Shopware\Core\Migration\Migration1536233520PromotionCartRule’,‘1536233520’), (‘Shopware\Core\Migration\Migration1536233530SalesChannelCategoryId’,‘1536233530’), (‘Shopware\Core\Migration\Migration1536233540ProductSearchKeyword’,‘1536233540’), (‘Shopware\Core\Migration\Migration1536233550Tag’,‘1536233550’), (‘Shopware\Core\Migration\Migration1536233560BasicData’,‘1536233560’), (‘Shopware\Core\Migration\Migration1552360944MediaFolderConfigurationNoAssoc’,‘1552360944’), (‘Shopware\Core\Migration\Migration1554199340AddImportExportProfile’,‘1554199340’), (‘Shopware\Core\Migration\Migration1554200141ImportExportFile’,‘1554200141’), (‘Shopware\Core\Migration\Migration1554203706AddImportExportLog’,‘1554203706’), (‘Shopware\Core\Migration\Migration1558082916AddBreadcrumb’,‘1558082916’), (‘Shopware\Core\Migration\Migration1558105657CurrencyPrices’,‘1558105657’), (‘Shopware\Core\Migration\Migration1558443337PromotionSalesChannel’,‘1558443337’), (‘Shopware\Core\Migration\Migration1558505525Logging’,‘1558505525’), (‘Shopware\Core\Migration\Migration1558594334PromotionDiscountPrice’,‘1558594334’), (‘Shopware\Core\Migration\Migration1558938938ChangeGroupSortingColumn’,‘1558938938’), (‘Shopware\Core\Migration\Migration1559050088Promotion’,‘1559050088’), (‘Shopware\Core\Migration\Migration1559050903PromotionExclusion’,‘1559050903’), (‘Shopware\Core\Migration\Migration1561370284AddImportExportProductProfile’,‘1561370284’), (‘Shopware\Core\Migration\Migration1561377793AddAvailableAsShippingCountry’,‘1561377793’), (‘Shopware\Core\Migration\Migration1561442979ElasticsearchIndexTask’,‘1561442979’), (‘Shopware\Core\Migration\Migration1561452005Update’,‘1561452005’), (‘Shopware\Core\Migration\Migration1561712450NewSystemConfigsAndDefaultValues’,‘1561712450’), (‘Shopware\Core\Migration\Migration1562228335SetConfigDefaults’,‘1562228335’), (‘Shopware\Core\Migration\Migration1562240231UserPasswordRecovery’,‘1562240231’), (‘Shopware\Core\Migration\Migration1562306893MakeCustomerFirstLoginDateTime’,‘1562306893’), (‘Shopware\Core\Migration\Migration1562324772AddOrderDateToOrder’,‘1562324772’), (‘Shopware\Core\Migration\Migration1562579120ProductAvailableFields’,‘1562579120’), (‘Shopware\Core\Migration\Migration1562684474AddDeliveryTime’,‘1562684474’), (‘Shopware\Core\Migration\Migration1562841035AddProductChildCount’,‘1562841035’), (‘Shopware\Core\Migration\Migration1562933907ContactForm’,‘1562933907’), (‘Shopware\Core\Migration\Migration1563180880AddDefaultThumbnailSizes’,‘1563180880’);’: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘fit_sw6.migration’ doesn’t exist

File: /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxx/public/recovery/common/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php

Line: 172

Trace

Same Problem =(

Wenn die Tabelle nicht existiert liegt es meist an der MariaDB version

Danke für den Hinweis, d.h. welche Maria DB Version wird benötigt?

mind. 10.3.x

Hi,

Ihr benötigt MySQL 5.7 oder das performantere MariaDB 10.3 - falls Ihr einen vServer / Dedi bei uns habt und mind. Shopware 5.5.x einsetzt, könnt Ihr Euch gerne im Support melden - die Instanzen werden kostenlos auf MariaDB 10.3 umgestellt. Im einfachen Shared Hosting sind die Shopware 6 / 5.6 Voraussetzungen bereits umgesetzt.

VG

 

EDIT solved for me: Hoster All-inkl

Solution: Shopware Issuetracker

Mysql 5.7.26-nmm1-log - (Ubuntu)

Static analysis:

2 errors were found during analysis.

 

  1. A symbol name was expected! A reserved keyword can not be used as a column name without backquotes. (near „CHECK“ at position 522)
  2. Unrecognized statement type. (near „JSON_VALID“ at position 528)

 

SQL query:

CREATE TABLE custom_field ( id BINARY(16) NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, config JSON NULL, active TINYINT(1) NOT NULL DEFAULT 1, set_id BINARY(16) NULL, created_at DATETIME(3) NOT NULL, updated_at DATETIME(3) NULL, CONSTRAINT uniq.custom_field.name UNIQUE (name), CONSTRAINT json.custom_field.config CHECK(JSON_VALID(config)), CONSTRAINT fk.custom_field.set_id FOREIGN KEY (set_id) REFERENCES custom_field_set (id) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

MySQL said:

#1215 - Cannot add foreign key constraint