Hi All,
I have done new Commcare local installation and migration seems to be
failing all the time:
Running ./manage.py syncdb --noinput first time give me this error:
./manage.py syncdb --noinput Second time:
*/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/contrib/sites/models.py:65:
RemovedInDjango19Warning: Model class django.contrib.sites.models.Site
doesn't declare an explicit app_label and either isn't in an application in
INSTALLED_APPS or else was imported before its application was loaded. This
will no longer be supported in Django 1.9. class
Site(models.Model):Operations to perform: Synchronize unmigrated apps:
mobile_auth, facilities, toggle, preindex, style, dhis2, ctable,
hqcouchlog, intrahealth, up_nrhm, hope, kookoo, pact, yo, hqpillow_retry,
translations, util, megamobile, appstore, twilio, fluff, prelogin, smsgh,
common, couchapps, tropo, djangular, openlmis, analytics, ws4redis, export,
repeaters, care_pathways, importer, reports_core, bihar, sislog,
care_benin, performance_sms, casegroups, mvp_docs, gsid, succeed, groups,
hsph, mvp, styleguide, unicel, reports, fri, formtranslate, api,
registration, colalife, hqcase, consumption, grapevine, custom_data_fields,
ucla, indicators, mach, mvp_indicators, mptt, ota, crs_reports, compressor,
auditcare, case, builds, mc, wisepill, uth, djcelery, fluff_filter,
dashboard, couchexport, world_vision, utils, domainsync, loadtestendpoints,
couchlog, openclinica, es, test, cvsu, crispy_forms, http, users, hqmedia,
crud, pathindia, cachehq, hqscripts, callcenter, apposit, penn_state,
programs, cloudcare, test_pillowtop, ext Apply all migrations: logistics,
domain, locations, sites, couchforms, opm, accounting, fixtures,
doctypemigrations, sms, phonelog, ilsgateway, django_digest, contenttypes,
cleanup, commtrack, hqadmin, pillowtop, tzmigration, formplayer, smsforms,
sessions, data_interfaces, guinea_backup, auth, tastypie, form_processor,
pillow_retry, data_analytics, dropbox, django_prbac, userhack, telerivet,
phone, admin, m4change, reminders, ewsghana, toggle_ui, products,
userreports, smsbillables, hqwebapp, stock, sofabedSynchronizing apps
without migrations: Creating tables... Installing custom SQL...
Installing indexes...Running migrations: Applying
doctypemigrations.0004_auto_20151001_1809...Traceback (most recent call
last): File "./manage.py", line 73, in
execute_from_command_line(sys.argv) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/init.py",
line 385, in execute_from_command_line utility.execute() File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/init.py",
line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/base.py",
line 288, in run_from_argv self.execute(*args, **options.dict) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/base.py",
line 338, in execute output = self.handle(*args, **options) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/base.py",
line 533, in handle return self.handle_noargs(**options) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
line 27, in handle_noargs call_command("migrate", **options) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/init.py",
line 115, in call_command return klass.execute(*args, **defaults) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/base.py",
line 338, in execute output = self.handle(*args, *options) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 161, in handle executor.migrate(targets, plan,
fake=options.get("fake", False)) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
line 68, in migrate self.apply_migration(migration, fake=fake) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
line 102, in apply_migration migration.apply(project_state,
schema_editor) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/db/migrations/migration.py",
line 108, in apply operation.database_forwards(self.app_label,
schema_editor, project_state, new_state) File
"/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/db/migrations/operations/special.py",
line 117, in database_forwards self.code(from_state.render(),
schema_editor) File
"/home/moses/src/commcare-hq/corehq/doctypemigrations/djangomigrations.py",
line 41, in forwards raise
MigrationNotComplete(MIGRATION_MESSAGE.format(slug=migrator.slug))corehq.doctypemigrations.djangomigrations.MigrationNotComplete:
Before you can merge you must run the user_db_migration doc_type
migration.If you're seeing this on your dev machine, run./manage.py
sync_couchdb./manage.py run_doctype_migration user_db_migration
--initial./manage.py migrateand that final migrate should go through
without a hitch.After you migrate/update your code and everything's working
fine, run./manage.py run_doctype_migration user_db_migration --cleanupto
delete the documents from the source db that have been copied to the target
dbIf you're seeing this on a production deploytake note of the full
file path to this aborted release,something like
"/home/cchq/www/production/releases/2015-10-16_19.37",and then follow the
full instructions for the zero-downtime live
swap:https://github.com/dimagi/commcare-hq/blob/master/corehq/doctypemigrations/README.md#run-the-doctype-migrationInstead
of the "current" release, use the path to this release.(This simply has the
effect of running the process on up-to-date code.)
If I run* ./manage.py sync_couchdb*:
/home/moses/Envs/cchq/local/lib/python2.7/site-packages/django/contrib/sites/models.py:65:
RemovedInDjango19Warning: Model class django.contrib.sites.models.Site
doesn't declare an explicit app_label and either isn't in an application in
INSTALLED_APPS or else was imported before its application was loaded. This
will no longer be supported in Django 1.9.
class Site(models.Model):
sync auditcare
in CouchDB
sync casexml.apps.case
in CouchDB
sync corehq.apps.casegroups
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/casegroups/_design don't exists, no
ddoc synchronized
sync casexml.apps.phone
in CouchDB
sync corehq.apps.cleanup
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/cleanup/_design don't exists, no
ddoc synchronized
sync corehq.apps.cloudcare
in CouchDB
sync corehq.apps.accounting
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/accounting/_design don't exists, no
ddoc synchronized
sync corehq.apps.domain
in CouchDB
sync corehq.apps.hqadmin
in CouchDB
sync corehq.apps.hqcase
in CouchDB
sync corehq.apps.hqmedia
in CouchDB
sync corehq.apps.locations
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/locations/_design don't exists, no
ddoc synchronized
sync corehq.apps.products
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/products/_design don't exists, no
ddoc synchronized
sync corehq.apps.programs
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/programs/_design don't exists, no
ddoc synchronized
sync corehq.apps.commtrack
in CouchDB
sync corehq.apps.consumption
in CouchDB
sync couchforms
in CouchDB
sync couchexport
in CouchDB
sync couchlog
in CouchDB
sync ctable
in CouchDB
sync corehq.apps.callcenter
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/callcenter/_design don't exists, no
ddoc synchronized
sync corehq.apps.custom_data_fields
in CouchDB
sync corehq.apps.repeaters
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/repeaters/_design don't exists, no
ddoc synchronized
sync corehq.apps.app_manager
in CouchDB
sync corehq.apps.facilities
in CouchDB
sync corehq.apps.fixtures
in CouchDB
sync corehq.apps.importer
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/importer/_design don't exists, no
ddoc synchronized
sync corehq.apps.reminders
in CouchDB
sync corehq.apps.translations
in CouchDB
sync corehq.apps.users
in CouchDB
sync corehq.apps.groups
in CouchDB
sync corehq.apps.mobile_auth
in CouchDB
sync corehq.apps.sms
in CouchDB
sync corehq.messaging.smsbackends.tropo
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/tropo/_design
don't exists, no ddoc synchronized
sync corehq.messaging.smsbackends.twilio
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/twilio/_design
don't exists, no ddoc synchronized
sync corehq.messaging.smsbackends.megamobile
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/megamobile/_design
don't exists, no ddoc synchronized
sync corehq.messaging.smsbackends.telerivet
in CouchDB
sync corehq.messaging.smsbackends.mach
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/mach/_design don't
exists, no ddoc synchronized
sync corehq.messaging.smsbackends.http
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/http/_design don't
exists, no ddoc synchronized
sync corehq.messaging.smsbackends.smsgh
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/smsgh/_design
don't exists, no ddoc synchronized
sync corehq.messaging.smsbackends.apposit
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/apposit/_design
don't exists, no ddoc synchronized
sync corehq.messaging.smsbackends.test
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/test/_design don't
exists, no ddoc synchronized
sync corehq.apps.performance_sms
in CouchDB
sync corehq.apps.registration
in CouchDB
sync corehq.messaging.smsbackends.unicel
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/unicel/_design
don't exists, no ddoc synchronized
sync corehq.apps.reports
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/reports/_design don't exists, no
ddoc synchronized
sync corehq.apps.userreports
in CouchDB
sync corehq.apps.export
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/export/_design don't exists, no
ddoc synchronized
sync corehq.apps.builds
in CouchDB
sync corehq.apps.api
in CouchDB
/home/moses/src/commcare-hq/corehq/apps/api/_design don't exists, no ddoc
synchronized
sync corehq.apps.indicators
in CouchDB
sync custom.apps.wisepill
in CouchDB
sync custom.fri
in CouchDB
sync fluff
in CouchDB
sync fluff.fluff_filter
in CouchDB
sync toggle
in CouchDB
/home/moses/src/commcare-hq/submodules/toggle/toggle/_design don't exists,
no ddoc synchronized
sync phonelog
in CouchDB
sync pillow_retry
in CouchDB
/home/moses/src/commcare-hq/submodules/pillowtop-src/pillow_retry/_design
don't exists, no ddoc synchronized
sync corehq.messaging.smsbackends.grapevine
in CouchDB
/home/moses/src/commcare-hq/corehq/messaging/smsbackends/grapevine/_design
don't exists, no ddoc synchronized
sync dimagi.ext
in CouchDB
/home/moses/src/commcare-hq/submodules/dimagi-utils-src/dimagi/ext/_design
don't exists, no ddoc synchronized
sync custom.bihar
in CouchDB
/home/moses/src/commcare-hq/custom/bihar/_design don't exists, no ddoc
synchronized
sync custom.penn_state
in CouchDB
sync custom.apps.gsid
in CouchDB
/home/moses/src/commcare-hq/custom/apps/gsid/_design don't exists, no ddoc
synchronized
sync hsph
in CouchDB
/home/moses/src/commcare-hq/custom/_legacy/hsph/_design don't exists, no
ddoc synchronized
sync mvp
in CouchDB
/home/moses/src/commcare-hq/custom/_legacy/mvp/_design don't exists, no
ddoc synchronized
sync mvp_docs
in CouchDB
/home/moses/src/commcare-hq/custom/_legacy/mvp_docs/_design don't exists,
no ddoc synchronized
sync custom.opm
in CouchDB
/home/moses/src/commcare-hq/custom/opm/_design don't exists, no ddoc
synchronized
sync pathindia
in CouchDB
sync pact
in CouchDB
sync custom.apps.care_benin
in CouchDB
sync custom.apps.cvsu
in CouchDB
/home/moses/src/commcare-hq/custom/apps/cvsu/_design don't exists, no ddoc
synchronized
sync custom.reports.mc
in CouchDB
/home/moses/src/commcare-hq/custom/reports/mc/_design don't exists, no ddoc
synchronized
sync custom.apps.crs_reports
in CouchDB
sync custom.hope
in CouchDB
/home/moses/src/commcare-hq/custom/hope/_design don't exists, no ddoc
synchronized
sync custom.ilsgateway
in CouchDB
/home/moses/src/commcare-hq/custom/ilsgateway/_design don't exists, no ddoc
synchronized
sync custom.ewsghana
in CouchDB
/home/moses/src/commcare-hq/custom/ewsghana/_design don't exists, no ddoc
synchronized
sync custom.m4change
in CouchDB
sync custom.succeed
in CouchDB
/home/moses/src/commcare-hq/custom/succeed/_design don't exists, no ddoc
synchronized
sync custom.uth
in CouchDB
sync custom.intrahealth
in CouchDB
/home/moses/src/commcare-hq/custom/intrahealth/_design don't exists, no
ddoc synchronized
sync custom.world_vision
in CouchDB
/home/moses/src/commcare-hq/custom/world_vision/_design don't exists, no
ddoc synchronized
sync custom.care_pathways
in CouchDB
/home/moses/src/commcare-hq/custom/care_pathways/_design don't exists, no
ddoc synchronized
sync custom.dhis2
in CouchDB
/home/moses/src/commcare-hq/custom/dhis2/_design don't exists, no ddoc
synchronized
Anyone who has encountered this before. How do I resolve this?