Hello Massimo, Yarko,
It is possible that we have problems in executing SQL migrations with 
MySQL (maybe postgres too) database because:

When you generate data in web2py, it starts with id=0, but when you 
export/import SQL database, all data starts with id=1, so when you try 
to import the SQL INSERT sentences, mysql complais with:
#1452 - Cannot add or update a child row: a foreign key constraint fails 
(`example`.`proyectos`, CONSTRAINT `proyectos_ibfk_1` FOREIGN KEY 
(`autor`) REFERENCES `auth_user` (`id`) ON DELETE CASCADE)

Clear Example: in web2py, the first auth_user has "id=0", and there is a 
table "projects" with "auth_user_id" reference (to that user: so id 
equals to 0), but when you export MYSQL, the first auth_user turns to 
"id=1", so wherever it trays to do an INSERT into "projects" with 
"auth_user_id = 0" it complains whith that error...
Maybe you can say to SQL to start with 0 but I think is not so good 
aproximation...

I searched for this question, but I didnt found anything.. so sorry if 
it is repeated...

regards,
Alex


-- 
Alejandro Fanjul Fdez.
[email protected]
www.mhproject.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to