#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):

 Yes, leaving master/slave out of this ticket seems like a good idea.

 So, currently even if `ContentTypes` and `Permissions` are installed to
 each database by default, the data isn't created by syncdb to 'other'.
 Actually, the default is populated by doing a `manage.py syncdb
 --database=other`. This seems wrong - the default DB should not be touched
 at all if syncing 'other'.

 So, here is a simplified suggestion for this ticket:
   1. Make sure the default database isn't accessed at all by syncdb
 --database='other' (If there are more errors than contenttypes and
 permissions, then deal with them in separate tickets).
   2. Sync the contenttypes and permissions only to one database.
   3. The database is 'default' if the contenttypes _and_ permissions are
 installed to the 'default' database. If they are not synced to 'default'
 database, don't do anything at all.

 The above solution is very limited, if you want the models in some other
 DB than default or you want the models mirrored to other databases you are
 on your own. In short, this is the simplest fix to the current situation I
 can think of. It works mostly as currently, except that 'default' isn't
 touched at all by syncdb --database=other.

 I wonder what to do with documenting this... Maybe something along the
 lines that we currently do not handle syncing the contenttypes and
 permissions data to other databases than default, but we might change this
 later on.

 This means we will intentionally leave two use-cases open:
   - installing the data in 'other' only
   - no syncing between databases

 To solve the above issues we need a notion of "master" database for
 contenttypes and permissions.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16039#comment:21>
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.


Reply via email to