Ok, Yarko, this is the second time it happens to me, but surely I'm 
doing something wrong... Let me go deeper and see if I can reconstruc 
all the process...
I'll keep you informed
alex f

El 22/07/2009 22:36, Yarko Tymciurak escribió:
> I have never seen this problem - we used postgresql for PyCon2009 
> registration system, and I did migrations (against Massimo's strong, 
> fearful cautions!)  on the live system, and all things worked,
>
> Perhaps I am not understanding the problem you are describing.... can 
> you show some example steps so someone can reproduce what you are seeing?
>
> On Wed, Jul 22, 2009 at 3:06 PM, Alex Fanjul <[email protected] 
> <mailto:[email protected]>> wrote:
>
>
>     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] <mailto:[email protected]>
>     www.mhproject.org <http://www.mhproject.org>
>
>
>
>
> >

-- 
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