New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aimeos\MW\DB\Exception : SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint label:"help wanted" #252
Comments
Do you have a type mismatch of users.id and users_address.parentid column? |
it seem there is a mismatch. |
Can you post the output of
|
|
Tables are OK. Do you have any records in users_address table? |
No record in user_address table |
Found the problem: You |
ALTER TABLE users ENGINE = InnoDB; corrected the table in the database add 'engine' => 'InnoDB', to database connections will fix it in laravel 'connections' => [ |
Thanks |
you should go to table |
Environment
Describe the bug
I am trying to install aimeos for the first time using Laravel 5.7.* and got this error...
php artisan aimeos:setup
--option=setup/default/demo:1
Initializing or updating the Aimeos database tables for site "default"
Changing typeid of mshop_attribute table OK
Adding code column to mshop_catalog OK
Renaming product warehouse table OK
Adding ctime/mtime/user columns to tables
Renaming catalog index tables to index
Checking table "mshop_catalog_index_attribute" OK
Checking table "mshop_catalog_index_catalog" OK
Checking table "mshop_catalog_index_price" OK
Checking table "mshop_catalog_index_text" OK
Changing "domain" columns
Checking table "mshop_attribute": OK
Checking table "mshop_attribute_type": OK
Checking table "mshop_attribute_list_type": OK
Checking table "mshop_attribute_list": OK
Checking table "mshop_catalog": OK
Checking table "mshop_catalog_list_type": OK
Checking table "mshop_catalog_list": OK
Checking table "mshop_catalog_suggest": OK
Checking table "mshop_media_type": OK
Checking table "mshop_media_list_type": OK
Checking table "mshop_media": OK
Checking table "mshop_media_list": OK
Checking table "mshop_plugin": OK
Checking table "mshop_price": OK
Checking table "mshop_product_type": OK
Checking table "mshop_product_list_type": OK
Checking table "mshop_product_list": OK
Checking table "mshop_product_tag_type": OK
Checking table "mshop_service": OK
Checking table "mshop_service_list_type": OK
Checking table "mshop_service_list": OK
Checking table "mshop_text_type": OK
Checking table "mshop_text": OK
Checking table "mshop_text_list_type": OK
Checking table "mshop_text_list": OK
Adding mtime, ctime, editor columns to coupon tables
Checking table "mshop_coupon"
Checking table "mshop_coupon_code"
Checking table "mshop_order_base_coupon"
Migrating configuration keys in coupon tables OK
Adding status column to all list tables
Checking table "mshop_attribute_list": OK
Checking table "mshop_catalog_list": OK
Checking table "mshop_customer_list": OK
Checking table "mshop_media_list": OK
Checking table "mshop_price_list": OK
Checking table "mshop_product_list": OK
Checking table "mshop_service_list": OK
Checking table "mshop_text_list": OK
Changing typeid of mshop_media table OK
Adding id to order service attribute table
Checking column "id": OK
Adding siteid to order tables
Checking table "mshop_order_base": OK
Checking table "mshop_order": OK
Checking table "mshop_order_base_address": OK
Checking table "mshop_order_base_discount": OK
Checking table "mshop_order_base_product": OK
Checking table "mshop_order_base_service": OK
Checking table "mshop_order_base_product_attr": OK
Checking table "mshop_order_base_service_attr": OK
Adding product ID to order base product table
Checking table "mshop_order_base_product": OK
Adding warehouse code to order base product table OK
Adding service ID to order base service table
Checking table "mshop_order_base_service": OK
Migrating order address salutations
Checking table "mshop_order_base_address": OK
Adding tax column to order tables
Checking table "mshop_order_base_product": OK
Checking table "mshop_order_base_service": OK
Checking table "mshop_order_base": OK
Migrating order emailflag colum to order status list
Fixing order email status values OK
Migrating order flags to order status list
Migrating order type
Checking table "mshop_order": OK
Renaming order base customercode to customerid
Checking table "mshop_order_base": OK
Renaming order base product amount to quantity
Checking table "mshop_order_base_product": OK
Renaming order columns pdate,ddate,dstatus,pstatus
Checking columne "ddate": OK
Checking columne "pdate": OK
Checking columne "pstatus": OK
Checking columne "dstatus": OK
Renaming order domain
Checking table "mshop_order": OK
Checking table "mshop_order_base_address": OK
Checking table "mshop_order_base_service": OK
Renaming shipping to costs
Checking table "mshop_order_base": OK
Checking table "mshop_order_base_product": OK
Checking table "mshop_order_base_service": OK
Renaming column "discount" to "rebate"
Checking table "mshop_price" OK
Checking table "mshop_order_base" OK
Checking table "mshop_order_base_product" OK
Checking table "mshop_order_base_service" OK
Renaming column "price" to "value"
Checking table "mshop_price" OK
Renaming shipping to costs
Checking table "mshop_price": OK
Rename "prodid" to "parentid" in table "mshop_product_stock"
Checking column "prodid" OK
Changing code from "product" to "default" in "mshop_product_type" OK
Changing typeid column of product table
Checking table "mshop_product": OK
Migrating product property domain to "product" OK
Changing warehouseid column in mshop_product_stock OK
Rename warehouse table
Drop "mshop_product_stock.fk_msprost_whid" OK
Drop "mshop_product_stock.fk_msprost_stock_warehouseid" OK
Rename "mshop_product_stock.wareshouseid" OK
Rename "mshop_product_stock_wareshouse" OK
Move stock tables to own domain
Checking "mshop_product_stock" OK
Checking "mshop_product_stock_type" OK
Adding label and status columns for product warehouse
Ensure unique codes in mshop_service OK
Migrate product code in stock table
Moving product tag tables to own domain
Moving table "mshop_product_tag_type" OK
Moving table "mshop_product_tag" OK
Adding label to mshop text table OK
Changing typeid of mshop_text table OK
Adding parentid column to catalog and locale_site
Checking parentid column in "mshop_catalog" OK
Checking parentid column in "mshop_locale_site" OK
Remove left over Laravel user address records OK
Remove left over Laravel user list records OK
Creating base tables
Using schema from locale.php
Checking table "mshop_locale_site": done
Checking table "mshop_locale_language": done
Checking table "mshop_locale_currency": done
Checking table "mshop_locale": done
Using schema from attribute.php
Checking table "mshop_attribute_type": done
Checking table "mshop_attribute": done
Checking table "mshop_attribute_list_type": done
Checking table "mshop_attribute_list": done
Checking table "mshop_attribute_property_type": done
Checking table "mshop_attribute_property": done
Using schema from customer.php
Checking table "mshop_customer": done
Checking table "mshop_customer_address": done
Checking table "mshop_customer_list_type": done
Checking table "mshop_customer_list": done
Checking table "mshop_customer_group": done
Checking table "mshop_customer_property_type": done
Checking table "mshop_customer_property": done
Checking table "users": done
Checking table "users_address":
Aimeos\MW\DB\Exception : SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
at E:\ck's menuenu\4th year\Project\web\code\inventhair\vendor\aimeos\aimeos-core\lib\mwlib\src\MW\DB\Statement\DBAL\Simple.php:91
87|
88| try {
89| $result = $this->exec();
90| } catch( \PDOException $e ) {
Exception trace:
1 Aimeos\MW\DB\Statement\DBAL\Simple::execute()
E:\ck's menuenu\4th year\Project\web\code\inventhair\vendor\aimeos\aimeos-core\lib\mwlib\src\MW\Setup\Task\Base.php:153
2 Aimeos\MW\Setup\Task\Base::executeList("db-customer")
E:\ck's menuenu\4th year\Project\web\code\inventhair\vendor\aimeos\aimeos-core\lib\mshoplib\setup\TablesCreateMShop.php:197
Please use the argument -v to see more details.
The text was updated successfully, but these errors were encountered: