#16039: syncdb with --database option fails
-------------------------------------+-------------------------------------
     Reporter:  yedpodtrzitko        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  reopened
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by asandroq):

 * status:  closed => reopened
 * cc: asandroq (added)
 * resolution:  needsinfo =>


Comment:

 This is Django 1.3.1. My setup uses two databases, an SQLite one and a
 PostgreSQL one. The application we deploy to customers was based on SQLite
 and the next version will use PostgreSQL. So I want to call syncdb on both
 DBs, and then use dumpdata/loaddata to move the data over. When calling
 {{{syncdb --database=old_mdm --noinput}}} in the instalation script, I get
 the error above.

 {{{
 #!python
 DATABASES = {
         'default': {
                 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add
 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
                 'NAME': 'mdm',                      # Or path to database
 file if using sqlite3.
                 'USER': 'django',                      # Not used with
 sqlite3.
                 'PASSWORD': 'abcabc',                  # Not used with
 sqlite3.
                 'HOST': 'localhost',                      # Set to empty
 string for localhost. Not used with sqlite3.
                 'PORT': '5432',                      # Set to empty string
 for default. Not used with sqlite3.
         },
         'old_mdm': {
                 'ENGINE': 'django.db.backends.sqlite3', # Add
 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
                 'NAME': '/fwxserver/DB/django.sqlite',
 # Or path to database file if using sqlite3.
                 'USER': '',                      # Not used with sqlite3.
                 'PASSWORD': '',                  # Not used with sqlite3.
                 'HOST': '',                      # Set to empty string for
 localhost. Not used with sqlite3.
                 'PORT': '',                      # Set to empty string for
 default. Not used with sqlite3.
         }
 }

 MIDDLEWARE_CLASSES = (
         'django.middleware.common.CommonMiddleware',
         'django.contrib.sessions.middleware.SessionMiddleware',
 #    'django.middleware.csrf.CsrfViewMiddleware',
         'django.contrib.auth.middleware.AuthenticationMiddleware',
         'django.contrib.messages.middleware.MessageMiddleware',
         'django.middleware.transaction.TransactionMiddleware',
 )

 INSTALLED_APPS = (
         'django.contrib.auth',
         'django.contrib.contenttypes',
         'django.contrib.sessions',
         'django.contrib.sites',
         'django.contrib.messages',
         'api',
         'ios',
         'django.contrib.admin',
         'south',
         # Uncomment the next line to enable admin documentation:
         # 'django.contrib.admindocs',

         # Sentry
         'indexer',
         'paging',
         'sentry',
         'sentry.client',
 )
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16039#comment:4>
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 this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to