Jonathan LaCour wrote:
Another issue recently cropped up for me. SQLObject doesn't seem to
handle the creation / generation of schemas very well when it comes to
dependent objects. I have seen this mentioned before, and the
workaround is generally the same ("create your tables one by one in a
different order").
This workaround doesn't work for me, because my project has several
tables that reference _each other_. The constraints get created in
such a way that it doesn't matter _what_ order I create things in, it
simply won't work.
The way I get around this, for now, is to have tg-admin dump out the
generated SQL, remove all the constraints, create the tables, and then
alter the tables to add the constraints back in. This makes it so it
doesn't matter what order you create the tables in, and you still get
your constraints. This has been a problem for a lot of people, and it
seems like my manual solution could be put in `tg- admin sql create` to
fix this issue all together.
What do you all think? I will volunteer to create a patch to SQLObject
to do this, if it seems like an acceptable solution.
I think this is resolved in 0.8, and I think will be in 0.7.1 as well --
createTable returns a list of constraints to be applied later, and
sqlobject-admin collects all these and runs them after all the tables
are created.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org