#16039: syncdb with --database option fails -------------------------------------+------------------------------------- Reporter: yedpodtrzitko | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.4 (models, ORM) | Resolution: Severity: Release blocker | Triage Stage: Design Keywords: | decision needed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by akaariai): I am beginning to think that if you get any contenttypes to a DB, then you might want them all. For example users will likely want to store all permissions in one database (the database which contains the Users and Groups data). Even permissions for models which are not synced to the default database, so that there is one DB to ask for all permissions. But, if we install all permissions to a database, then we need all ContentTypes there too. The "sync only those contenttypes whose model is in the DB" seems useful for one use case - GenericForeignKeys. But that isn't the only use case. And, installing additional ContetTypes into a DB seems safe to me. This ticket has potential for endless amounts of complexity. MultiDB is complex. In addition we don't have information about the use case, nor do we know essential information: for example in master-slave setup we don't know which DB is the master... So, another proposal for solution: - Sync _all_ contenttypes and permissions to default database (this is essentially what is happening now) - No sync at all for other databases The proposal isn't the ultimate right solution. But it is simple and safe. With the information at hand at sync time doing anything smarter might be hard, too. I am not a multidb expert at all. But, if this ticket doesn't get a solution from others for 1.5, then I am going to go with the simple solution. -- Ticket URL: <https://code.djangoproject.com/ticket/16039#comment:25> Django <https://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 https://groups.google.com/groups/opt_out.