#1946: [patch] to allow overriding of default sequence name ---------------------------------------------------+------------------------ Reporter: ab...@cabal.org.uk | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: Resolution: | Keywords: Stage: Accepted | Has_patch: 1 Needs_docs: 1 | Needs_tests: 1 Needs_better_patch: 1 | ---------------------------------------------------+------------------------ Comment (by mtredinnick):
For anybody working to bring this to conclusion, a few notes from some discussions Rob Hudson and I have had about this: There are three separate sub-problems that probably need to be addressed. 1. Manually specifying the sequence name to use. 2. Specifying that `ModelA` should use the same sequence name as `ModelB` 3. Perhaps: somehow creating the sequence for case 1. It's not necessarily compulsory that all are solved, and the original problem description only looks at situation 1, from what I understand. The difficulty there is when does this sequence we are referring to by name get created? It can't be as part of "initial SQL" processing or post_syncdb signal handling, since that's after the table has been created and, presumably, the sequence has to exist before you can refer to it in a table definition. Maybe that's completely out of scope (quite possibly). If not, it's situation 3. Solving that certainly makes testing a lot easier (might well move it from "impossible" into the "possible" category). The second point, above, seems to be something that might crop up quite naturally here. If you want to share a sequence for some reason, you need to indicate that, but you don't actually know the name of the sequence. Again, maybe out of scope, although it would be nice if it were possible. -- Ticket URL: <http://code.djangoproject.com/ticket/1946#comment:13> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---