-
Notifications
You must be signed in to change notification settings - Fork 348
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
Seed into mysql doesn't work #122
Comments
@pjsotou thank you, will take a look to see what can be going on here. Quick question. Have you tried, adding your own data when running SQL and exporting and reimporting. I wonder if that will work for you. When I created that export I was using SQLite, maybe there is something that is happening here. |
FYI: Also doesnt work with a postgres installation (I am not using the backend - already had strapi installed) Here is the output from the import: strapi import -f ../nextjs-corporate-starter/seed-data.tar.gz (all I did was create an admin user before running the import) |
Just some follow up questions.
In order to have smooth sailing with Data Transfer your schema has to match exactly. Hence you are getting this message.
What I would recommend as a way to test. Use your currant Strpai instance.
This way we can see if it is the DTS that is failing or that the backup from my project is not compatible with yours. Let, me know how it goes. And thank you. |
When I try to run the project using a MySQL instance the import doesnt work
yarn strapi import -f ../seed-data.tar.gz
[ERROR] insert into
components_layout_footers_categories_links
(category_id
,category_order
,footer_id
) values (2, 3, 2) - ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (strapi
.components_layout_footers_categories_links
, CONSTRAINTcomponents_layout_footers_categories_links_fk
FOREIGN KEY (footer_id
) REFERENCEScomponents_layout_footers
(id
) ON DEL)Here is my docker file
version: '3.1'
Here is my databse.js
Remember to run in the mysql instance and exec
The text was updated successfully, but these errors were encountered: