I'll answer what I can from a quick review of the codebase. On Thursday, May 29, 2014 12:36:39 PM UTC-5, jpk wrote: > > Yeah, I came across that as well, but it didn't work on 1.6. I cloned and > debugged it up until I got the exact same error as the paste in my first > message. :( > > So, a few questions: > > - Am I correct in my analysis that the syncdb command alone is > generating the table creation sql that includes the constraint redshift is > barfing on? > > No, syncdb (or in 1.7+ migrate) eventually calls the correct db backend to generate the sql. You can see from the code<https://github.com/django/django/blob/stable/1.6.x/django/core/management/commands/syncdb.py>that there is no SQL there, just calls to the backend sql generation (In particular look at line 96<https://github.com/django/django/blob/stable/1.6.x/django/core/management/commands/syncdb.py#L96> )
> > - If I were to patch the syncdb command code, is it reasonable to > consult the database backend for settings related to which constraints are > allowed/not? > > I would not change the sync code. A better path would probably be to start with the postgres backend and make the changes necessary for redshift (I assume that is what the django-redshift project started to do) > > - Does it make more sense for the database backend code to do the > table creation instead of syncdb? (As in, db backends provide might an > abstracted create table method that syncdb could just call instead of > building its own sql.) > > I know more than I did a day ago, but I'm still not super hip on how db > backends are implemented and how the rest of the framework interacts with > them. So if the stuff I'm asking doesn't make sense then do put me on the > right path. :) > > Thanks! > jpk > Kirby -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5a094392-088f-4062-b85a-2a0a24bf192b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

