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 <alex.fan...@gmail.com> 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.
> alex.fan...@gmail.com
> 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 web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to