From 7deb24bf31e7683f94675ddd9b57a98fbd5410d3 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Tue, 18 Aug 2020 09:11:43 -0400 Subject: [PATCH 01/18] Moved common settings to "base.py" --- onadata/settings/base.py | 168 +++++++++++++++++++++++++++++------- onadata/settings/dev.py | 2 + onadata/settings/prod.py | 167 +---------------------------------- onadata/settings/testing.py | 101 ++-------------------- 4 files changed, 145 insertions(+), 293 deletions(-) diff --git a/onadata/settings/base.py b/onadata/settings/base.py index 4d7d65a8a..4909487f1 100644 --- a/onadata/settings/base.py +++ b/onadata/settings/base.py @@ -1,28 +1,19 @@ # coding: utf-8 -# vim: set fileencoding=utf-8 -# this system uses structured settings as defined in -# http://www.slideshare.net/jacobian/the-best-and-worst-of-django -# -# this is the base settings.py -- which contains settings common to all -# implementations of ona: edit it at last resort -# -# local customizations should be done in several files each of which in turn -# imports this one. -# The local files should be used as the value for your DJANGO_SETTINGS_FILE -# environment variable as needed. import logging import multiprocessing import os import subprocess # nopep8, used by included files import sys # nopep8, used by included files +import dj_database_url from django.conf.global_settings import PASSWORD_HASHERS from django.core.exceptions import SuspiciousOperation from django.utils.six import string_types +from django.utils.six.moves.urllib.parse import quote_plus from pymongo import MongoClient +from pyxform.xform2json import logger from onadata.libs.utils.redis_helper import RedisHelper -from pyxform.xform2json import logger BASE_DIR = os.path.dirname(os.path.dirname(__file__)) ONADATA_DIR = BASE_DIR @@ -38,7 +29,7 @@ MANAGERS = ADMINS -DEFAULT_FROM_EMAIL = 'noreply@ona.io' +DEFAULT_FROM_EMAIL = 'noreply@kobotoolbox.org' DEFAULT_SESSION_EXPIRY_TIME = 21600 # 6 hours # Local time zone for this installation. Choices can be found here: @@ -69,7 +60,7 @@ # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" -MEDIA_URL = 'http://localhost:8000/media/' +MEDIA_URL = f"/{os.environ.get('KOBOCAT_MEDIA_URL', 'media').strip('/')}/" # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files @@ -89,25 +80,21 @@ ENKETO_URL = ENKETO_URL.rstrip('/') ENKETO_API_TOKEN = os.environ.get('ENKETO_API_TOKEN', 'enketorules') -ENKETO_VERSION = os.environ.get('ENKETO_VERSION', 'Legacy').lower() -assert ENKETO_VERSION in ['legacy', 'express'] +ENKETO_VERSION = 'express' + # Constants. ENKETO_API_ENDPOINT_ONLINE_SURVEYS = '/survey' ENKETO_API_ENDPOINT_OFFLINE_SURVEYS = '/survey/offline' ENKETO_API_ENDPOINT_INSTANCE = '/instance' ENKETO_API_ENDPOINT_INSTANCE_IFRAME = '/instance/iframe' + # Computed settings. -if ENKETO_VERSION == 'express': - ENKETO_API_ROOT = '/api/v2' - ENKETO_OFFLINE_SURVEYS = os.environ.get('ENKETO_OFFLINE_SURVEYS', 'True').lower() == 'true' - ENKETO_API_ENDPOINT_PREVIEW = '/preview' - ENKETO_API_ENDPOINT_SURVEYS = ENKETO_API_ENDPOINT_OFFLINE_SURVEYS if ENKETO_OFFLINE_SURVEYS \ - else ENKETO_API_ENDPOINT_ONLINE_SURVEYS -else: - ENKETO_API_ROOT= '/api_v1' - ENKETO_API_ENDPOINT_PREVIEW = '/webform/preview' - ENKETO_OFFLINE_SURVEYS = False - ENKETO_API_ENDPOINT_SURVEYS = ENKETO_API_ENDPOINT_ONLINE_SURVEYS +ENKETO_API_ROOT = '/api/v2' +ENKETO_OFFLINE_SURVEYS = os.environ.get('ENKETO_OFFLINE_SURVEYS', 'True').lower() == 'true' +ENKETO_API_ENDPOINT_PREVIEW = '/preview' +ENKETO_API_ENDPOINT_SURVEYS = ENKETO_API_ENDPOINT_OFFLINE_SURVEYS if ENKETO_OFFLINE_SURVEYS \ + else ENKETO_API_ENDPOINT_ONLINE_SURVEYS + ENKETO_API_SURVEY_PATH = ENKETO_API_ROOT + ENKETO_API_ENDPOINT_SURVEYS ENKETO_API_INSTANCE_PATH = ENKETO_API_ROOT + ENKETO_API_ENDPOINT_INSTANCE ENKETO_PREVIEW_URL = ENKETO_URL + ENKETO_API_ENDPOINT_PREVIEW @@ -153,6 +140,7 @@ ] MIDDLEWARE = [ + 'onadata.koboform.redirect_middleware.ConditionalRedirects', 'reversion.middleware.RevisionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', @@ -186,6 +174,7 @@ ], 'OPTIONS': { 'context_processors': [ + 'onadata.koboform.context_processors.koboform_integration', 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', @@ -439,9 +428,12 @@ def skip_suspicious_operations(record): REST_SERVICE_MAX_RETRIES = 3 # celery -CELERY_BROKER_URL = 'redis://localhost:6389/2' -CELERY_RESULT_BACKEND = 'redis://localhost:6389/2' # telling Celery to report results to Redis -CELERY_TASK_ALWAYS_EAGER = False +CELERY_BROKER_URL = os.environ.get( + 'KOBOCAT_BROKER_URL', 'redis://localhost:6389/2') + +CELERY_RESULT_BACKEND = CELERY_BROKER_URL + +CELERY_TASK_ALWAYS_EAGER = os.environ.get('SKIP_CELERY', 'False') == 'True' # Celery defaults to having as many workers as there are cores. To avoid # excessive resource consumption, don't spawn more than 6 workers by default @@ -467,6 +459,16 @@ def skip_suspicious_operations(record): "visibility_timeout": 120 * (10 ** REST_SERVICE_MAX_RETRIES) # Longest ETA for RestService } +CELERY_BEAT_SCHEDULE = { + # Periodically mark exports stuck in the "pending" state as "failed" + # See https://github.com/kobotoolbox/kobocat/issues/315 + 'log-stuck-exports-and-mark-failed': { + 'task': 'onadata.apps.viewer.tasks.log_stuck_exports_and_mark_failed', + 'schedule': timedelta(hours=6), + 'options': {'queue': 'kobocat_queue'} + }, +} + CELERY_TASK_DEFAULT_QUEUE = "kobocat_queue" # duration to keep zip exports before deletion (in seconds) @@ -478,9 +480,7 @@ def skip_suspicious_operations(record): TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' NOSE_ARGS = ['--with-fixture-bundling'] -# fake endpoints for testing -TEST_HTTP_HOST = 'testserver.com' -TEST_USERNAME = 'bob' + # re-captcha in registrations REGISTRATION_REQUIRE_CAPTCHA = False @@ -591,6 +591,108 @@ def skip_suspicious_operations(record): # The maximum size (in bytes) that an upload will be before it gets streamed to the file system FILE_UPLOAD_MAX_MEMORY_SIZE = 10485760 +# MongoDB +MONGO_DATABASE = { + 'HOST': os.environ.get('KOBOCAT_MONGO_HOST', 'mongo'), + 'PORT': int(os.environ.get('KOBOCAT_MONGO_PORT', 27017)), + 'NAME': os.environ.get('KOBOCAT_MONGO_NAME', 'formhub'), + 'USER': os.environ.get('KOBOCAT_MONGO_USER', ''), + 'PASSWORD': os.environ.get('KOBOCAT_MONGO_PASS', '') +} + +if MONGO_DATABASE.get('USER') and MONGO_DATABASE.get('PASSWORD'): + MONGO_CONNECTION_URL = "mongodb://{user}:{password}@{host}:{port}/{db_name}".\ + format( + user=MONGO_DATABASE['USER'], + password=quote_plus(MONGO_DATABASE['PASSWORD']), + host=MONGO_DATABASE['HOST'], + port=MONGO_DATABASE['PORT'], + db_name=MONGO_DATABASE['NAME'] + ) +else: + MONGO_CONNECTION_URL = "mongodb://%(HOST)s:%(PORT)s/%(NAME)s" % MONGO_DATABASE + +# PyMongo 3 does acknowledged writes by default +# https://emptysqua.re/blog/pymongos-new-default-safe-writes/ +MONGO_CONNECTION = MongoClient( + MONGO_CONNECTION_URL, j=True, tz_aware=True) + +MONGO_DB = MONGO_CONNECTION[MONGO_DATABASE['NAME']] + +LOCALE_PATHS = [os.path.join(PROJECT_ROOT, 'locale'), ] + +DEBUG = os.environ.get('DJANGO_DEBUG', 'True') == 'True' +TEMPLATE_DEBUG = os.environ.get('TEMPLATE_DEBUG', 'True') == 'True' + +# Database (i.e. PostgreSQL) +DATABASES = { + 'default': dj_database_url.config(default="sqlite:///%s/db.sqlite3" % PROJECT_ROOT) +} +# Replacement for TransactionMiddleware +DATABASES['default']['ATOMIC_REQUESTS'] = True + +# Django `SECRET_KEY` +try: + SECRET_KEY = os.environ['DJANGO_SECRET_KEY'] +except KeyError: + raise Exception('DJANGO_SECRET_KEY must be set in the environment.') + +ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS', '*').split(' ') + +TESTING_MODE = False + +# Domain must not exclude KPI when sharing sessions +if os.environ.get('SESSION_COOKIE_DOMAIN'): + SESSION_COOKIE_DOMAIN = os.environ['SESSION_COOKIE_DOMAIN'] + SESSION_COOKIE_NAME = 'kobonaut' + +SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' + +KOBOFORM_SERVER = os.environ.get("KOBOFORM_SERVER", "localhost") +KOBOFORM_SERVER_PORT = os.environ.get("KOBOFORM_SERVER_PORT", "8000") +KOBOFORM_SERVER_PROTOCOL = os.environ.get("KOBOFORM_SERVER_PROTOCOL", "http") +KOBOFORM_LOGIN_AUTOREDIRECT = True +KOBOFORM_URL = os.environ.get("KOBOFORM_URL", "http://kf.kobo.local") +KOBOCAT_URL = os.environ.get("KOBOCAT_URL", "http://kc.kobo.local") + +# BEGIN external service integration codes +AWS_ACCESS_KEY_ID = os.environ.get('KOBOCAT_AWS_ACCESS_KEY_ID') +AWS_SECRET_ACCESS_KEY = os.environ.get('KOBOCAT_AWS_SECRET_ACCESS_KEY') +AWS_STORAGE_BUCKET_NAME = os.environ.get('KOBOCAT_AWS_STORAGE_BUCKET_NAME') +AWS_DEFAULT_ACL = 'private' +AWS_S3_FILE_BUFFER_SIZE = 50 * 1024 * 1024 + +# TODO pass these variables from `kobo-docker` envfiles +AWS_QUERYSTRING_EXPIRE = os.environ.get("KOBOCAT_AWS_QUERYSTRING_EXPIRE", 3600) +AWS_S3_USE_SSL = os.environ.get("KOBOCAT_AWS_S3_USE_SSL", True) +AWS_S3_HOST = os.environ.get("KOBOCAT_AWS_S3_HOST", "s3.amazonaws.com") + +GOOGLE_ANALYTICS_PROPERTY_ID = os.environ.get("GOOGLE_ANALYTICS_TOKEN", False) +GOOGLE_ANALYTICS_DOMAIN = "auto" +# END external service integration codes + +# If not properly overridden, leave uninitialized so Django can set the default. +# (see https://docs.djangoproject.com/en/1.8/ref/settings/#default-file-storage) +if os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE'): + DEFAULT_FILE_STORAGE = os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE') + +EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', + 'django.core.mail.backends.filebased.EmailBackend') + +if EMAIL_BACKEND == 'django.core.mail.backends.filebased.EmailBackend': + EMAIL_FILE_PATH = os.environ.get( + 'EMAIL_FILE_PATH', os.path.join(PROJECT_ROOT, 'emails')) + if not os.path.isdir(EMAIL_FILE_PATH): + os.mkdir(EMAIL_FILE_PATH) + +# Default value for the `UserProfile.require_auth` attribute +REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT = os.environ.get( + 'REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT', + 'False') == 'True' + +POSTGIS_VERSION = (2, 5, 4) + # Monkey Patch PyXForm. @ToDo remove after upgrading to v1.1.0 logger.removeHandler(logging.NullHandler) logger.addHandler(logging.NullHandler()) + diff --git a/onadata/settings/dev.py b/onadata/settings/dev.py index 330a720a8..1c64b5207 100644 --- a/onadata/settings/dev.py +++ b/onadata/settings/dev.py @@ -11,3 +11,5 @@ 'handlers': ['console'], 'level': 'DEBUG' } + +MIDDLEWARE.append('onadata.libs.utils.middleware.ExceptionLoggingMiddleware') diff --git a/onadata/settings/prod.py b/onadata/settings/prod.py index cd5e72f15..bfb97714b 100644 --- a/onadata/settings/prod.py +++ b/onadata/settings/prod.py @@ -1,13 +1,10 @@ # coding: utf-8 from datetime import timedelta -import logging -import os -import dj_database_url + from celery.signals import after_setup_logger -from django.utils.six.moves.urllib.parse import quote_plus -from onadata.settings.base import * +from .base import * def celery_logger_setup_handler(logger, **kwargs): @@ -23,56 +20,6 @@ def celery_logger_setup_handler(logger, **kwargs): logger.addHandler(my_handler) -LOCALE_PATHS = [os.path.join(PROJECT_ROOT, 'locale'), ] - -DEBUG = os.environ.get('DJANGO_DEBUG', 'True') == 'True' -TEMPLATE_DEBUG = os.environ.get('TEMPLATE_DEBUG', 'True') == 'True' -TEMPLATE_STRING_IF_INVALID = '' - - -DATABASES = { - 'default': dj_database_url.config(default="sqlite:///%s/db.sqlite3" % PROJECT_ROOT) -} -# Replacement for TransactionMiddleware -DATABASES['default']['ATOMIC_REQUESTS'] = True - -MONGO_DATABASE = { - 'HOST': os.environ.get('KOBOCAT_MONGO_HOST', 'mongo'), - 'PORT': int(os.environ.get('KOBOCAT_MONGO_PORT', 27017)), - 'NAME': os.environ.get('KOBOCAT_MONGO_NAME', 'formhub'), - 'USER': os.environ.get('KOBOCAT_MONGO_USER', ''), - 'PASSWORD': os.environ.get('KOBOCAT_MONGO_PASS', '') -} - -CELERY_BROKER_URL = os.environ.get( - 'KOBOCAT_BROKER_URL', 'amqp://guest:guest@rabbit:5672/') - -CELERY_RESULT_BACKEND = CELERY_BROKER_URL - -try: - SECRET_KEY = os.environ['DJANGO_SECRET_KEY'] -except KeyError: - raise Exception('DJANGO_SECRET_KEY must be set in the environment.') - -ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS', '*').split(' ') - -TESTING_MODE = False -# This trick works only when we run tests from the command line. -if len(sys.argv) >= 2 and (sys.argv[1] == "test"): - raise Exception( - "Testing destroys data and must NOT be run in a production " - "environment. Please use a different settings file if you want to " - "run tests." - ) - TESTING_MODE = True -else: - TESTING_MODE = False - -MEDIA_URL = f"/{os.environ.get('KOBOCAT_MEDIA_URL', 'media').strip('/')}/" -STATIC_URL = '/static/' -LOGIN_URL = '/accounts/login/' -LOGIN_REDIRECT_URL = '/login_redirect/' - if os.environ.get('KOBOCAT_ROOT_URI_PREFIX'): KOBOCAT_ROOT_URI_PREFIX = '/' + os.environ['KOBOCAT_ROOT_URI_PREFIX'].strip('/') + '/' MEDIA_URL = KOBOCAT_ROOT_URI_PREFIX + MEDIA_URL.lstrip('/') @@ -80,103 +27,7 @@ def celery_logger_setup_handler(logger, **kwargs): LOGIN_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_URL.lstrip('/') LOGIN_REDIRECT_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_REDIRECT_URL.lstrip('/') -if TESTING_MODE: - MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'test_media/') - subprocess.call(["rm", "-r", MEDIA_ROOT]) - MONGO_DATABASE['NAME'] = "formhub_test" - CELERY_TASK_ALWAYS_EAGER = True - BROKER_BACKEND = 'memory' - ENKETO_API_TOKEN = 'abc' - #TEST_RUNNER = 'djcelery.contrib.test_runner.CeleryTestSuiteRunner' -else: - MEDIA_ROOT = os.path.join(PROJECT_ROOT, MEDIA_URL.lstrip('/')) - -if PRINT_EXCEPTION and DEBUG: - MIDDLEWARE.append('onadata.libs.utils.middleware.ExceptionLoggingMiddleware') - -# Clear out the test database -if TESTING_MODE: - MONGO_DB.instances.drop() - -KOBOFORM_SERVER = os.environ.get("KOBOFORM_SERVER", "localhost") -KOBOFORM_SERVER_PORT = os.environ.get("KOBOFORM_SERVER_PORT", "8000") -KOBOFORM_SERVER_PROTOCOL = os.environ.get("KOBOFORM_SERVER_PROTOCOL", "http") -KOBOFORM_LOGIN_AUTOREDIRECT = True -KOBOFORM_URL = os.environ.get("KOBOFORM_URL", "http://kf.kobo.local") -KOBOCAT_URL = os.environ.get("KOBOCAT_URL", "http://kc.kobo.local") - - -TEMPLATES[0]['OPTIONS']['context_processors'].insert( - 0, 'onadata.koboform.context_processors.koboform_integration') - -MIDDLEWARE.insert(0, 'onadata.koboform.redirect_middleware.ConditionalRedirects') - -# Domain must not exclude KPI when sharing sessions -if os.environ.get('SESSION_COOKIE_DOMAIN'): - SESSION_COOKIE_DOMAIN = os.environ['SESSION_COOKIE_DOMAIN'] - SESSION_COOKIE_NAME = 'kobonaut' - -SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' - -# for debugging -# print "KOBOFORM_URL=%s" % KOBOFORM_URL -# print "SECRET_KEY=%s" % SECRET_KEY -# print "CSRF_COOKIE_DOMAIN=%s " % CSRF_COOKIE_DOMAIN - -# MongoDB - moved here from base.py -if MONGO_DATABASE.get('USER') and MONGO_DATABASE.get('PASSWORD'): - MONGO_CONNECTION_URL = "mongodb://{user}:{password}@{host}:{port}/{db_name}".\ - format( - user=MONGO_DATABASE['USER'], - password=quote_plus(MONGO_DATABASE['PASSWORD']), - host=MONGO_DATABASE['HOST'], - port=MONGO_DATABASE['PORT'], - db_name=MONGO_DATABASE['NAME'] - ) -else: - MONGO_CONNECTION_URL = "mongodb://%(HOST)s:%(PORT)s/%(NAME)s" % MONGO_DATABASE - -# PyMongo 3 does acknowledged writes by default -# https://emptysqua.re/blog/pymongos-new-default-safe-writes/ -MONGO_CONNECTION = MongoClient( - MONGO_CONNECTION_URL, j=True, tz_aware=True) - -MONGO_DB = MONGO_CONNECTION[MONGO_DATABASE['NAME']] - -# BEGIN external service integration codes -AWS_ACCESS_KEY_ID = os.environ.get('KOBOCAT_AWS_ACCESS_KEY_ID') -AWS_SECRET_ACCESS_KEY = os.environ.get('KOBOCAT_AWS_SECRET_ACCESS_KEY') -AWS_STORAGE_BUCKET_NAME = os.environ.get('KOBOCAT_AWS_STORAGE_BUCKET_NAME') -AWS_DEFAULT_ACL = 'private' -AWS_S3_FILE_BUFFER_SIZE = 50 * 1024 * 1024 -# TODO pass these variables from `kobo-docker` envfiles -AWS_QUERYSTRING_EXPIRE = os.environ.get("KOBOCAT_AWS_QUERYSTRING_EXPIRE", 3600) -AWS_S3_USE_SSL = os.environ.get("KOBOCAT_AWS_S3_USE_SSL", True) -AWS_S3_HOST = os.environ.get("KOBOCAT_AWS_S3_HOST", "s3.amazonaws.com") - - -GOOGLE_ANALYTICS_PROPERTY_ID = os.environ.get("GOOGLE_ANALYTICS_TOKEN", False) -GOOGLE_ANALYTICS_DOMAIN = "auto" -# END external service integration codes - -# If not properly overridden, leave uninitialized so Django can set the default. -# (see https://docs.djangoproject.com/en/1.8/ref/settings/#default-file-storage) -if os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE'): - DEFAULT_FILE_STORAGE = os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE') - -EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', - 'django.core.mail.backends.filebased.EmailBackend') - -if EMAIL_BACKEND == 'django.core.mail.backends.filebased.EmailBackend': - EMAIL_FILE_PATH = os.environ.get( - 'EMAIL_FILE_PATH', os.path.join(PROJECT_ROOT, 'emails')) - if not os.path.isdir(EMAIL_FILE_PATH): - os.mkdir(EMAIL_FILE_PATH) - -# Default value for the `UserProfile.require_auth` attribute -REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT = os.environ.get( - 'REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT', - 'False') == 'True' +MEDIA_ROOT = os.path.join(PROJECT_ROOT, MEDIA_URL.lstrip('/')) # Optional Sentry configuration: if desired, be sure to install Raven and set # RAVEN_DSN in the environment @@ -259,17 +110,6 @@ def celery_logger_setup_handler(logger, **kwargs): CELERY_WORKER_HIJACK_ROOT_LOGGER = False after_setup_logger.connect(celery_logger_setup_handler) -POSTGIS_VERSION = (2, 5, 0) - -CELERY_BEAT_SCHEDULE = { - # Periodically mark exports stuck in the "pending" state as "failed" - # See https://github.com/kobotoolbox/kobocat/issues/315 - 'log-stuck-exports-and-mark-failed': { - 'task': 'onadata.apps.viewer.tasks.log_stuck_exports_and_mark_failed', - 'schedule': timedelta(hours=6), - 'options': {'queue': 'kobocat_queue'} - }, -} # ## ISSUE 242 TEMPORARY FIX ### # See https://github.com/kobotoolbox/kobocat/issues/242 @@ -291,4 +131,3 @@ def celery_logger_setup_handler(logger, **kwargs): SESSION_ENGINE = "redis_sessions.session" SESSION_REDIS = RedisHelper.config(default="redis://redis_cache:6380/2") - diff --git a/onadata/settings/testing.py b/onadata/settings/testing.py index 01306185a..c01b655fc 100644 --- a/onadata/settings/testing.py +++ b/onadata/settings/testing.py @@ -1,14 +1,8 @@ # coding: utf-8 import dj_database_url - from mongomock import MongoClient as MockMongoClient -from onadata.settings.base import * - -DEBUG = os.environ.get('DJANGO_DEBUG', 'True') == 'True' -TEMPLATE_DEBUG = os.environ.get('TEMPLATE_DEBUG', 'True') == 'True' -TEMPLATE_STRING_IF_INVALID = '' - +from .base import * DATABASES = { 'default': dj_database_url.config( @@ -27,102 +21,13 @@ MONGO_CONNECTION_URL, j=True, tz_aware=True) MONGO_DB = MONGO_CONNECTION['formhub_test'] - -CELERY_BROKER_URL = os.environ.get( - 'KOBOCAT_BROKER_URL', 'amqp://guest:guest@rabbit:5672/') - -try: - SECRET_KEY = os.environ['DJANGO_SECRET_KEY'] -except KeyError: - raise Exception('DJANGO_SECRET_KEY must be set in the environment.') - -ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS', '*').split(' ') - TESTING_MODE = True -MEDIA_URL = '/' + os.environ.get('KOBOCAT_MEDIA_URL', 'media').strip('/') + '/' -STATIC_URL = '/static/' -LOGIN_URL = '/accounts/login/' -LOGIN_REDIRECT_URL = '/login_redirect/' - -if os.environ.get('KOBOCAT_ROOT_URI_PREFIX'): - KOBOCAT_ROOT_URI_PREFIX = '/' + os.environ['KOBOCAT_ROOT_URI_PREFIX'].strip('/') + '/' - MEDIA_URL = KOBOCAT_ROOT_URI_PREFIX + MEDIA_URL.lstrip('/') - STATIC_URL = KOBOCAT_ROOT_URI_PREFIX + STATIC_URL.lstrip('/') - LOGIN_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_URL.lstrip('/') - LOGIN_REDIRECT_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_REDIRECT_URL.lstrip('/') - MEDIA_ROOT = '/tmp/test_media/' CELERY_TASK_ALWAYS_EAGER = True BROKER_BACKEND = 'memory' ENKETO_API_TOKEN = 'abc' -if PRINT_EXCEPTION and DEBUG: - MIDDLEWARE.append('onadata.libs.utils.middleware.ExceptionLoggingMiddleware') - -KOBOFORM_SERVER = os.environ.get("KOBOFORM_SERVER", "localhost") -KOBOFORM_SERVER_PORT = os.environ.get("KOBOFORM_SERVER_PORT", "8000") -KOBOFORM_SERVER_PROTOCOL = os.environ.get("KOBOFORM_SERVER_PROTOCOL", "http") -# KOBOFORM_LOGIN_AUTOREDIRECT=True -KOBOFORM_URL = os.environ.get("KOBOFORM_URL", "http://localhost:8000") - -TEMPLATES[0]['OPTIONS']['context_processors'].append('onadata.koboform.context_processors.koboform_integration') - -# Domain must not exclude KPI when sharing sessions -if os.environ.get('SESSION_COOKIE_DOMAIN'): - SESSION_COOKIE_DOMAIN = os.environ['SESSION_COOKIE_DOMAIN'] - SESSION_COOKIE_NAME = 'kobonaut' - -SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' - -# for debugging -# print "KOBOFORM_URL=%s" % KOBOFORM_URL -# print "SECRET_KEY=%s" % SECRET_KEY -# print "CSRF_COOKIE_DOMAIN=%s " % CSRF_COOKIE_DOMAIN - -# BEGIN external service integration codes -AWS_ACCESS_KEY_ID = os.environ.get('KOBOCAT_AWS_ACCESS_KEY_ID') -AWS_SECRET_ACCESS_KEY = os.environ.get('KOBOCAT_AWS_SECRET_ACCESS_KEY') -AWS_STORAGE_BUCKET_NAME = os.environ.get('KOBOCAT_AWS_STORAGE_BUCKET_NAME') -AWS_DEFAULT_ACL = 'private' - -GOOGLE_ANALYTICS_PROPERTY_ID = os.environ.get("GOOGLE_ANALYTICS_TOKEN", False) -GOOGLE_ANALYTICS_DOMAIN = "auto" -# END external service integration codes - -# If not properly overridden, leave uninitialized so Django can set the default. -# (see https://docs.djangoproject.com/en/1.8/ref/settings/#default-file-storage) -if os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE'): - DEFAULT_FILE_STORAGE = os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE') - -EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', - 'django.core.mail.backends.filebased.EmailBackend') - -if EMAIL_BACKEND == 'django.core.mail.backends.filebased.EmailBackend': - EMAIL_FILE_PATH = os.environ.get( - 'EMAIL_FILE_PATH', os.path.join(PROJECT_ROOT, 'emails')) - if not os.path.isdir(EMAIL_FILE_PATH): - os.mkdir(EMAIL_FILE_PATH) - -# Optional Sentry configuration: if desired, be sure to install Raven and set -# RAVEN_DSN in the environment -if 'RAVEN_DSN' in os.environ: - try: - import raven - except ImportError: - print('Please install Raven to enable Sentry logging.') - else: - INSTALLED_APPS.append('raven.contrib.django.raven_compat') - RAVEN_CONFIG = { - 'dsn': os.environ['RAVEN_DSN'], - } - try: - RAVEN_CONFIG['release'] = raven.fetch_git_sha(BASE_DIR) - except raven.exceptions.InvalidGitRepository: - pass - -POSTGIS_VERSION = (2, 5, 0) - # DISABLE Django DB logging LOGGING['loggers']['django.db.backends'] = { 'level': 'WARNING', @@ -130,3 +35,7 @@ } GUARDIAN_GET_INIT_ANONYMOUS_USER = 'onadata.apps.main.models.user_profile.get_anonymous_user_instance' + +# fake endpoints for testing +TEST_HTTP_HOST = 'testserver.com' +TEST_USERNAME = 'bob' From 020183af351afc33d8b89cbe24ce0269dd50e5ad Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Tue, 18 Aug 2020 09:12:36 -0400 Subject: [PATCH 02/18] Removed scheduled task for tmp issue 242 --- onadata/settings/prod.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/onadata/settings/prod.py b/onadata/settings/prod.py index bfb97714b..57519af7b 100644 --- a/onadata/settings/prod.py +++ b/onadata/settings/prod.py @@ -110,24 +110,5 @@ def celery_logger_setup_handler(logger, **kwargs): CELERY_WORKER_HIJACK_ROOT_LOGGER = False after_setup_logger.connect(celery_logger_setup_handler) - -# ## ISSUE 242 TEMPORARY FIX ### -# See https://github.com/kobotoolbox/kobocat/issues/242 -ISSUE_242_MINIMUM_INSTANCE_ID = os.environ.get( - 'ISSUE_242_MINIMUM_INSTANCE_ID', None) -ISSUE_242_INSTANCE_XML_SEARCH_STRING = os.environ.get( - 'ISSUE_242_INSTANCE_XML_SEARCH_STRING', 'uploaded_form_') -if ISSUE_242_MINIMUM_INSTANCE_ID is not None: - CELERY_BEAT_SCHEDULE['fix-root-node-names'] = { - 'task': 'onadata.apps.logger.tasks.fix_root_node_names', - 'schedule': timedelta(hours=1), - 'kwargs': { - 'pk__gte': int(ISSUE_242_MINIMUM_INSTANCE_ID), - 'xml__contains': ISSUE_242_INSTANCE_XML_SEARCH_STRING - }, - 'options': {'queue': 'kobocat_queue'} - } -# ##### END ISSUE 242 FIX ###### - SESSION_ENGINE = "redis_sessions.session" SESSION_REDIS = RedisHelper.config(default="redis://redis_cache:6380/2") From 9a6e7d2136a234da9485da40a611301641eac39d Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Tue, 18 Aug 2020 09:41:28 -0400 Subject: [PATCH 03/18] Removed several settings from `base.py`: - removed South Migration configuration - removed nose tests configuration --- dependencies/pip/requirements.in | 1 - onadata/apps/main/backends.py | 14 -------- onadata/libs/utils/hashers.py | 24 ------------- onadata/settings/base.py | 62 +++++--------------------------- 4 files changed, 8 insertions(+), 93 deletions(-) delete mode 100644 onadata/apps/main/backends.py delete mode 100644 onadata/libs/utils/hashers.py diff --git a/dependencies/pip/requirements.in b/dependencies/pip/requirements.in index 3bb1d9c09..4162f0b35 100644 --- a/dependencies/pip/requirements.in +++ b/dependencies/pip/requirements.in @@ -46,7 +46,6 @@ openpyxl celery>=4.0,<5.0 celery[redis] amqp -django-nose raven # new export code relies on pandas>=0.12.0 diff --git a/onadata/apps/main/backends.py b/onadata/apps/main/backends.py deleted file mode 100644 index 73bca3420..000000000 --- a/onadata/apps/main/backends.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 -from django.contrib.auth.models import User -from django.contrib.auth.backends import ModelBackend as DjangoModelBackend - - -class ModelBackend(DjangoModelBackend): - def authenticate(self, username=None, password=None): - """Username is case insensitive.""" - try: - user = User.objects.get(username__iexact=username) - if user.check_password(password): - return user - except User.DoesNotExist: - return None diff --git a/onadata/libs/utils/hashers.py b/onadata/libs/utils/hashers.py deleted file mode 100644 index 3dc174349..000000000 --- a/onadata/libs/utils/hashers.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -from django.contrib.auth.hashers import PBKDF2PasswordHasher - -class PBKDF2PasswordHasher150KIterations(PBKDF2PasswordHasher): - """ - A subclass of PBKDF2PasswordHasher that uses 150,000 iterations, which is - the new default in Django 2.2. Using this avoids the following scenario: - 1. KPI inserts a password hash for user Keita into our database, calculated - with 150,000 iterations; - 2. Keita authenticates directly to KoBoCAT using HTTP Basic; - 3. KoBoCAT's Django 1.8 sees that the number of iterations used by the hash - in the database differs from what it prefers: - https://github.com/django/django/blob/6a0dc2176f4ebf907e124d433411e52bba39a28e/django/contrib/auth/hashers.py#L278-L280 - 4. KoBoCAT hashes the plain-text password using only 20,000 iterations, - 5. KoBoCAT calls `save()` on the user to update the password hash; - 6. All of Keita's sessions are invalidated. - - Further reading: https://github.com/kobotoolbox/kobocat/issues/612 - - This class essentially just copies an example from the documentation: - https://docs.djangoproject.com/en/1.8/topics/auth/passwords/#increasing-the-work-factor - """ - iterations = 150000 diff --git a/onadata/settings/base.py b/onadata/settings/base.py index 4909487f1..ad85cbaf8 100644 --- a/onadata/settings/base.py +++ b/onadata/settings/base.py @@ -2,18 +2,15 @@ import logging import multiprocessing import os -import subprocess # nopep8, used by included files -import sys # nopep8, used by included files +import sys +from datetime import timedelta import dj_database_url -from django.conf.global_settings import PASSWORD_HASHERS from django.core.exceptions import SuspiciousOperation -from django.utils.six import string_types from django.utils.six.moves.urllib.parse import quote_plus from pymongo import MongoClient from pyxform.xform2json import logger -from onadata.libs.utils.redis_helper import RedisHelper BASE_DIR = os.path.dirname(os.path.dirname(__file__)) ONADATA_DIR = BASE_DIR @@ -100,15 +97,15 @@ ENKETO_PREVIEW_URL = ENKETO_URL + ENKETO_API_ENDPOINT_PREVIEW ENKETO_API_INSTANCE_IFRAME_URL = ENKETO_URL + ENKETO_API_ROOT + ENKETO_API_ENDPOINT_INSTANCE_IFRAME -KPI_URL = os.environ.get('KPI_URL', False) -KPI_INTERNAL_URL = os.environ.get("KPI_INTERNAL_URL", KPI_URL) -KPI_HOOK_ENDPOINT_PATTERN = '/api/v2/assets/{asset_uid}/hook-signal/' - # specifically for site urls sent to enketo for form retrieval # `ENKETO_PROTOCOL` variable is overridden when internal domain name is used. # All internal communications between containers must be HTTP only. ENKETO_PROTOCOL = os.environ.get('ENKETO_PROTOCOL', 'https') +KPI_URL = os.environ.get('KPI_URL', False) +KPI_INTERNAL_URL = os.environ.get("KPI_INTERNAL_URL", KPI_URL) +KPI_HOOK_ENDPOINT_PATTERN = '/api/v2/assets/{asset_uid}/hook-signal/' + # These 2 variables are needed to detect whether the ENKETO_PROTOCOL should overwritten or not. # See method `_get_form_url` in `onadata/libs/utils/viewer_tools.py` KOBOCAT_INTERNAL_HOSTNAME = "{}.{}".format( @@ -158,6 +155,8 @@ ROOT_URLCONF = 'onadata.apps.main.urls' USE_TZ = True +# specify the root folder which may contain a templates folder and a static +# folder used to override templates for site specific details # include the kobocat-template directory TEMPLATE_OVERRIDE_ROOT_DIR = os.environ.get( 'KOBOCAT_TEMPLATES_PATH', @@ -315,9 +314,7 @@ # extra data stored with users AUTH_PROFILE_MODULE = 'onadata.apps.main.UserProfile' -# case insensitive usernames -- DISABLED for KoBoForm compatibility AUTHENTICATION_BACKENDS = ( - #'onadata.apps.main.backends.ModelBackend', 'django.contrib.auth.backends.ModelBackend', 'guardian.backends.ObjectPermissionBackend', ) @@ -477,21 +474,12 @@ def skip_suspicious_operations(record): # default content length for submission requests DEFAULT_CONTENT_LENGTH = 10000000 -TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' -NOSE_ARGS = ['--with-fixture-bundling'] - - - # re-captcha in registrations REGISTRATION_REQUIRE_CAPTCHA = False RECAPTCHA_USE_SSL = False RECAPTCHA_PRIVATE_KEY = '' RECAPTCHA_PUBLIC_KEY = '6Ld52OMSAAAAAJJ4W-0TFDTgbznnWWFf0XuOSaB6' -# specify the root folder which may contain a templates folder and a static -# folder used to override templates for site specific details -TEMPLATE_OVERRIDE_ROOT_DIR = None - # Use 1 or 0 for multiple selects instead of True or False for csv, xls exports BINARY_SELECT_MULTIPLES = False @@ -514,30 +502,6 @@ def skip_suspicious_operations(record): 'application/zip' ] -# legacy setting for old sites who still use a local_settings.py file and have -# not updated to presets/ -try: - from local_settings import * # nopep8 -except ImportError: - pass - -# Transition from South to native migrations -try: - from django.db import migrations -except ImportError: - # Native migrations unavailable; use South instead - INSTALLED_APPS.append['south'] - -SOUTH_MIGRATION_MODULES = { - 'taggit': 'taggit.south_migrations', - 'reversion': 'reversion.south_migrations', - 'onadata.apps.restservice': 'onadata.apps.restservice.south_migrations', - 'onadata.apps.api': 'onadata.apps.api.south_migrations', - 'onadata.apps.main': 'onadata.apps.main.south_migrations', - 'onadata.apps.logger': 'onadata.apps.logger.south_migrations', - 'onadata.apps.viewer': 'onadata.apps.viewer.south_migrations', -} - DEFAULT_VALIDATION_STATUSES = [ { 'uid': 'validation_status_not_approved', @@ -574,16 +538,6 @@ def skip_suspicious_operations(record): # Limit sessions to 1 week (the default is 2 weeks) SESSION_COOKIE_AGE = 604800 - -# KPI running Django 2.2 inserts password hashes into our database, calculated -# using 150,000 iterations. Django 1.8 uses only 20,000 iterations by default; -# increase this to match 2.2. See -# https://github.com/kobotoolbox/kobocat/issues/612 -PASSWORD_HASHERS = [ - 'onadata.libs.utils.hashers.PBKDF2PasswordHasher150KIterations' -] + PASSWORD_HASHERS - - # The maximum size in bytes that a request body may be before a SuspiciousOperation (RequestDataTooBig) is raised # This variable is available only in Django 1.10+. Only there for next upgrade DATA_UPLOAD_MAX_MEMORY_SIZE = 10485760 From 1a168e70967f93e65a8a5394172b5caa6f6bc8c9 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Tue, 18 Aug 2020 09:51:22 -0400 Subject: [PATCH 04/18] Removed raven package. Use sentry-sdk instead --- dependencies/pip/requirements.in | 4 +++- onadata/settings/base.py | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dependencies/pip/requirements.in b/dependencies/pip/requirements.in index 4162f0b35..7edfaba14 100644 --- a/dependencies/pip/requirements.in +++ b/dependencies/pip/requirements.in @@ -46,7 +46,6 @@ openpyxl celery>=4.0,<5.0 celery[redis] amqp -raven # new export code relies on pandas>=0.12.0 elaphe3 @@ -95,3 +94,6 @@ djangorestframework-guardian # Django Storage AWS boto3 + +# Sentry +sentry-sdk diff --git a/onadata/settings/base.py b/onadata/settings/base.py index ad85cbaf8..985154624 100644 --- a/onadata/settings/base.py +++ b/onadata/settings/base.py @@ -5,11 +5,13 @@ import sys from datetime import timedelta +import sentry_sdk import dj_database_url from django.core.exceptions import SuspiciousOperation from django.utils.six.moves.urllib.parse import quote_plus from pymongo import MongoClient from pyxform.xform2json import logger +from sentry_sdk.integrations.django import DjangoIntegration BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -646,6 +648,17 @@ def skip_suspicious_operations(record): POSTGIS_VERSION = (2, 5, 4) +if (os.getenv("SENTRY_DSN") or "") != "": + sentry_sdk.init( + dsn=os.environ['SENTRY_DSN'], + integrations=[DjangoIntegration()], + + # If you wish to associate users to errors (assuming you are using + # django.contrib.auth) you may enable sending PII data. + send_default_pii=True + ) + + # Monkey Patch PyXForm. @ToDo remove after upgrading to v1.1.0 logger.removeHandler(logging.NullHandler) logger.addHandler(logging.NullHandler()) From 682dc70a9aa4211b93585ad5f423de08b5651767 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Wed, 19 Aug 2020 13:14:38 -0400 Subject: [PATCH 05/18] Removed django-nose and raven pip packages. Added sentry-sdk --- dependencies/pip/dev.txt | 18 ++++++++++-------- dependencies/pip/prod.txt | 18 ++++++++++-------- dependencies/pip/requirements.txt | 18 ++++++++++-------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/dependencies/pip/dev.txt b/dependencies/pip/dev.txt index 833545c01..2d221d5b5 100644 --- a/dependencies/pip/dev.txt +++ b/dependencies/pip/dev.txt @@ -5,6 +5,7 @@ # pip-compile dependencies/pip/dev.in # -e git+https://github.com/dimagi/django-digest@52ba7edeb326efd97d5670273bb6fa8b0539e501#egg=django_digest # via -r dependencies/pip/requirements.in +-e git+https://github.com/jnm/django-storages@s3boto3_accurate_tell#egg=django_storages # via -r dependencies/pip/requirements.in -e git+https://github.com/dimagi/python-digest@5c94bb74516b977b60180ee832765c0695ff2b56#egg=python_digest # via -r dependencies/pip/requirements.in -e git+https://github.com/dresiu/recaptcha-client-1.0.6-py3@48078f8131e2f3c2054d2099ef48cfe9a5745d0c#egg=recaptcha-client # via -r dependencies/pip/requirements.in -e git+https://github.com/kobotoolbox/ssrf-protect@755efe16694273ce66060a51e04f973dc034ca4e#egg=ssrf_protect # via -r dependencies/pip/requirements.in @@ -15,8 +16,10 @@ backcall==0.2.0 # via ipython backports.csv==1.0.7 # via formpack begins==0.9 # via formpack billiard==3.6.3.0 # via celery +boto3==1.14.44 # via -r dependencies/pip/requirements.in +botocore==1.17.44 # via boto3, s3transfer celery[redis]==4.4.6 # via -r dependencies/pip/requirements.in, django-celery-beat -certifi==2020.6.20 # via requests +certifi==2020.6.20 # via requests, sentry-sdk chardet==3.0.4 # via requests cssselect==1.1.0 # via pyquery decorator==4.4.2 # via ipython, traitlets @@ -29,14 +32,12 @@ django-db-readonly==0.6.0 # via -r dependencies/pip/requirements.in django-extensions==3.0.3 # via -r dependencies/pip/requirements.in django-filter==2.3.0 # via -r dependencies/pip/requirements.in django-guardian==2.3.0 # via -r dependencies/pip/requirements.in, djangorestframework-guardian -django-nose==1.4.6 # via -r dependencies/pip/requirements.in django-oauth-toolkit==1.3.2 # via -r dependencies/pip/requirements.in django-pure-pagination==0.3.0 # via -r dependencies/pip/requirements.in django-redis-sessions==0.6.1 # via -r dependencies/pip/requirements.in django-registration-redux==2.8 # via -r dependencies/pip/requirements.in django-render-block==0.7 # via django-templated-email django-reversion==3.0.1 # via -r dependencies/pip/requirements.in -django-storages==1.9.1 # via -r dependencies/pip/requirements.in django-taggit==1.3.0 # via -r dependencies/pip/requirements.in django-templated-email==2.3.0 # via -r dependencies/pip/requirements.in django-timezone-field==4.0 # via -r dependencies/pip/requirements.in, django-celery-beat @@ -46,7 +47,7 @@ djangorestframework-guardian==0.3.0 # via -r dependencies/pip/requirements.in djangorestframework-jsonp==1.0.2 # via -r dependencies/pip/requirements.in djangorestframework-xml==2.0.0 # via -r dependencies/pip/requirements.in djangorestframework==3.11.0 # via -r dependencies/pip/requirements.in, djangorestframework-csv, djangorestframework-guardian -docutils==0.16 # via statistics +docutils==0.15.2 # via botocore, statistics dpath==2.0.1 # via -r dependencies/pip/requirements.in ecdsa==0.15 # via tlslite-ng elaphe3==0.2.0 # via -r dependencies/pip/requirements.in @@ -66,6 +67,7 @@ ipython-genutils==0.2.0 # via traitlets ipython==7.16.1 # via -r dependencies/pip/dev.in, ipdb jdcal==1.4.1 # via openpyxl jedi==0.17.2 # via ipython +jmespath==0.10.0 # via boto3, botocore jsonfield==3.1.0 # via -r dependencies/pip/requirements.in jsonschema==3.2.0 # via formpack kombu==4.6.11 # via celery @@ -76,7 +78,6 @@ mock==4.0.2 # via -r dependencies/pip/dev.in modilabs-python-utils==0.1.5 # via -r dependencies/pip/requirements.in mongomock==3.19.0 # via -r dependencies/pip/dev.in more-itertools==8.4.0 # via pytest -nose==1.3.7 # via django-nose numpy==1.19.0 # via pandas oauthlib==3.1.0 # via django-oauth-toolkit openpyxl==3.0.4 # via -r dependencies/pip/requirements.in @@ -102,15 +103,16 @@ pytest-django==3.9.0 # via -r dependencies/pip/dev.in pytest-env==0.6.2 # via -r dependencies/pip/dev.in pytest==5.4.3 # via -r dependencies/pip/dev.in, pytest-django, pytest-env python-crontab==2.5.1 # via django-celery-beat -python-dateutil==2.8.1 # via pandas, python-crontab +python-dateutil==2.8.1 # via botocore, pandas, python-crontab python-slugify==4.0.1 # via transifex-client pytz==2020.1 # via -r dependencies/pip/requirements.in, celery, django, django-timezone-field, pandas pyxform==0.15.1 # via -r dependencies/pip/requirements.in, formpack -raven==6.10.0 # via -r dependencies/pip/requirements.in redis==3.5.3 # via -r dependencies/pip/requirements.in, celery, django-redis-sessions requests==2.24.0 # via django-oauth-toolkit, httmock, transifex-client +s3transfer==0.3.3 # via boto3 https://bitbucket.org/fomcl/savreaderwriter/downloads/savReaderWriter-3.3.0.zip#egg=savreaderwriter # via -r dependencies/pip/requirements.in sentinels==1.0.0 # via mongomock +sentry-sdk==0.16.5 # via -r dependencies/pip/requirements.in shell-command==0.1 # via -r dependencies/pip/dev.in simplejson==3.17.2 # via -r dependencies/pip/requirements.in six==1.15.0 # via django-extensions, django-templated-email, djangorestframework-csv, ecdsa, jsonschema, mongomock, packaging, pyrsistent, python-dateutil, ssrf-protect, traitlets, transifex-client, unittest2 @@ -124,7 +126,7 @@ traitlets==4.3.3 # via ipython transifex-client==0.13.11 # via -r dependencies/pip/requirements.in unicodecsv==0.14.1 # via djangorestframework-csv, pyxform unittest2==1.1.0 # via pyxform -urllib3==1.25.9 # via requests, transifex-client +urllib3==1.25.9 # via botocore, requests, sentry-sdk, transifex-client vine==1.3.0 # via amqp, celery wcwidth==0.2.5 # via prompt-toolkit, pytest werkzeug==1.0.1 # via -r dependencies/pip/dev.in diff --git a/dependencies/pip/prod.txt b/dependencies/pip/prod.txt index e13354f6c..5af60933d 100644 --- a/dependencies/pip/prod.txt +++ b/dependencies/pip/prod.txt @@ -5,6 +5,7 @@ # pip-compile dependencies/pip/prod.in # -e git+https://github.com/dimagi/django-digest@52ba7edeb326efd97d5670273bb6fa8b0539e501#egg=django_digest # via -r dependencies/pip/requirements.in +-e git+https://github.com/jnm/django-storages@s3boto3_accurate_tell#egg=django_storages # via -r dependencies/pip/requirements.in -e git+https://github.com/dimagi/python-digest@5c94bb74516b977b60180ee832765c0695ff2b56#egg=python_digest # via -r dependencies/pip/requirements.in -e git+https://github.com/dresiu/recaptcha-client-1.0.6-py3@48078f8131e2f3c2054d2099ef48cfe9a5745d0c#egg=recaptcha-client # via -r dependencies/pip/requirements.in -e git+https://github.com/kobotoolbox/ssrf-protect@755efe16694273ce66060a51e04f973dc034ca4e#egg=ssrf_protect # via -r dependencies/pip/requirements.in @@ -14,8 +15,10 @@ attrs==19.3.0 # via jsonschema backports.csv==1.0.7 # via formpack begins==0.9 # via formpack billiard==3.6.3.0 # via celery +boto3==1.14.44 # via -r dependencies/pip/requirements.in +botocore==1.17.44 # via boto3, s3transfer celery[redis]==4.4.6 # via -r dependencies/pip/requirements.in, django-celery-beat -certifi==2020.6.20 # via requests +certifi==2020.6.20 # via requests, sentry-sdk chardet==3.0.4 # via requests cssselect==1.1.0 # via pyquery defusedxml==0.6.0 # via djangorestframework-xml @@ -27,14 +30,12 @@ django-db-readonly==0.6.0 # via -r dependencies/pip/requirements.in django-extensions==3.0.3 # via -r dependencies/pip/requirements.in django-filter==2.3.0 # via -r dependencies/pip/requirements.in django-guardian==2.3.0 # via -r dependencies/pip/requirements.in, djangorestframework-guardian -django-nose==1.4.6 # via -r dependencies/pip/requirements.in django-oauth-toolkit==1.3.2 # via -r dependencies/pip/requirements.in django-pure-pagination==0.3.0 # via -r dependencies/pip/requirements.in django-redis-sessions==0.6.1 # via -r dependencies/pip/requirements.in django-registration-redux==2.8 # via -r dependencies/pip/requirements.in django-render-block==0.7 # via django-templated-email django-reversion==3.0.1 # via -r dependencies/pip/requirements.in -django-storages==1.9.1 # via -r dependencies/pip/requirements.in django-taggit==1.3.0 # via -r dependencies/pip/requirements.in django-templated-email==2.3.0 # via -r dependencies/pip/requirements.in django-timezone-field==4.0 # via -r dependencies/pip/requirements.in, django-celery-beat @@ -44,7 +45,7 @@ djangorestframework-guardian==0.3.0 # via -r dependencies/pip/requirements.in djangorestframework-jsonp==1.0.2 # via -r dependencies/pip/requirements.in djangorestframework-xml==2.0.0 # via -r dependencies/pip/requirements.in djangorestframework==3.11.0 # via -r dependencies/pip/requirements.in, djangorestframework-csv, djangorestframework-guardian -docutils==0.16 # via statistics +docutils==0.15.2 # via botocore, statistics dpath==2.0.1 # via -r dependencies/pip/requirements.in ecdsa==0.15 # via tlslite-ng elaphe3==0.2.0 # via -r dependencies/pip/requirements.in @@ -59,6 +60,7 @@ gitpython==3.1.7 # via transifex-client httplib2==0.18.1 # via -r dependencies/pip/requirements.in idna==2.10 # via requests jdcal==1.4.1 # via openpyxl +jmespath==0.10.0 # via boto3, botocore jsonfield==3.1.0 # via -r dependencies/pip/requirements.in jsonschema==3.2.0 # via formpack kombu==4.6.11 # via celery @@ -66,7 +68,6 @@ linecache2==1.0.0 # via traceback2 lxml==4.5.2 # via -r dependencies/pip/requirements.in, formpack, gdata-python3, pyquery markdown==3.2.2 # via -r dependencies/pip/requirements.in modilabs-python-utils==0.1.5 # via -r dependencies/pip/requirements.in -nose==1.3.7 # via django-nose numpy==1.19.0 # via pandas oauthlib==3.1.0 # via django-oauth-toolkit openpyxl==3.0.4 # via -r dependencies/pip/requirements.in @@ -79,14 +80,15 @@ pymongo==3.10.1 # via -r dependencies/pip/requirements.in pyquery==1.4.1 # via formpack pyrsistent==0.16.0 # via jsonschema python-crontab==2.5.1 # via django-celery-beat -python-dateutil==2.8.1 # via pandas, python-crontab +python-dateutil==2.8.1 # via botocore, pandas, python-crontab python-slugify==4.0.1 # via transifex-client pytz==2020.1 # via -r dependencies/pip/requirements.in, celery, django, django-timezone-field, pandas pyxform==0.15.1 # via -r dependencies/pip/requirements.in, formpack -raven==6.10.0 # via -r dependencies/pip/requirements.in redis==3.5.3 # via -r dependencies/pip/requirements.in, celery, django-redis-sessions requests==2.24.0 # via django-oauth-toolkit, transifex-client +s3transfer==0.3.3 # via boto3 https://bitbucket.org/fomcl/savreaderwriter/downloads/savReaderWriter-3.3.0.zip#egg=savreaderwriter # via -r dependencies/pip/requirements.in +sentry-sdk==0.16.5 # via -r dependencies/pip/requirements.in simplejson==3.17.2 # via -r dependencies/pip/requirements.in six==1.15.0 # via django-extensions, django-templated-email, djangorestframework-csv, ecdsa, jsonschema, pyrsistent, python-dateutil, ssrf-protect, transifex-client, unittest2 smmap==3.0.4 # via gitdb @@ -98,7 +100,7 @@ traceback2==1.4.0 # via unittest2 transifex-client==0.13.11 # via -r dependencies/pip/requirements.in unicodecsv==0.14.1 # via djangorestframework-csv, pyxform unittest2==1.1.0 # via pyxform -urllib3==1.25.9 # via requests, transifex-client +urllib3==1.25.9 # via botocore, requests, sentry-sdk, transifex-client uwsgi==2.0.19.1 # via -r dependencies/pip/prod.in vine==1.3.0 # via amqp, celery xlrd==1.2.0 # via -r dependencies/pip/requirements.in, pyxform diff --git a/dependencies/pip/requirements.txt b/dependencies/pip/requirements.txt index 164d093a5..950972c5f 100644 --- a/dependencies/pip/requirements.txt +++ b/dependencies/pip/requirements.txt @@ -5,6 +5,7 @@ # pip-compile dependencies/pip/requirements.in # -e git+https://github.com/dimagi/django-digest@52ba7edeb326efd97d5670273bb6fa8b0539e501#egg=django_digest # via -r dependencies/pip/requirements.in +-e git+https://github.com/jnm/django-storages@s3boto3_accurate_tell#egg=django_storages # via -r dependencies/pip/requirements.in -e git+https://github.com/dimagi/python-digest@5c94bb74516b977b60180ee832765c0695ff2b56#egg=python_digest # via -r dependencies/pip/requirements.in -e git+https://github.com/dresiu/recaptcha-client-1.0.6-py3@48078f8131e2f3c2054d2099ef48cfe9a5745d0c#egg=recaptcha-client # via -r dependencies/pip/requirements.in -e git+https://github.com/kobotoolbox/ssrf-protect@755efe16694273ce66060a51e04f973dc034ca4e#egg=ssrf_protect # via -r dependencies/pip/requirements.in @@ -14,8 +15,10 @@ attrs==19.3.0 # via jsonschema backports.csv==1.0.7 # via formpack begins==0.9 # via formpack billiard==3.6.3.0 # via celery +boto3==1.14.44 # via -r dependencies/pip/requirements.in +botocore==1.17.44 # via boto3, s3transfer celery[redis]==4.4.6 # via -r dependencies/pip/requirements.in, django-celery-beat -certifi==2020.6.20 # via requests +certifi==2020.6.20 # via requests, sentry-sdk chardet==3.0.4 # via requests cssselect==1.1.0 # via pyquery defusedxml==0.6.0 # via djangorestframework-xml @@ -27,14 +30,12 @@ django-db-readonly==0.6.0 # via -r dependencies/pip/requirements.in django-extensions==3.0.3 # via -r dependencies/pip/requirements.in django-filter==2.3.0 # via -r dependencies/pip/requirements.in django-guardian==2.3.0 # via -r dependencies/pip/requirements.in, djangorestframework-guardian -django-nose==1.4.6 # via -r dependencies/pip/requirements.in django-oauth-toolkit==1.3.2 # via -r dependencies/pip/requirements.in django-pure-pagination==0.3.0 # via -r dependencies/pip/requirements.in django-redis-sessions==0.6.1 # via -r dependencies/pip/requirements.in django-registration-redux==2.8 # via -r dependencies/pip/requirements.in django-render-block==0.7 # via django-templated-email django-reversion==3.0.1 # via -r dependencies/pip/requirements.in -django-storages==1.9.1 # via -r dependencies/pip/requirements.in django-taggit==1.3.0 # via -r dependencies/pip/requirements.in django-templated-email==2.3.0 # via -r dependencies/pip/requirements.in django-timezone-field==4.0 # via -r dependencies/pip/requirements.in, django-celery-beat @@ -44,7 +45,7 @@ djangorestframework-guardian==0.3.0 # via -r dependencies/pip/requirements.in djangorestframework-jsonp==1.0.2 # via -r dependencies/pip/requirements.in djangorestframework-xml==2.0.0 # via -r dependencies/pip/requirements.in djangorestframework==3.11.0 # via -r dependencies/pip/requirements.in, djangorestframework-csv, djangorestframework-guardian -docutils==0.16 # via statistics +docutils==0.15.2 # via botocore, statistics dpath==2.0.1 # via -r dependencies/pip/requirements.in ecdsa==0.15 # via tlslite-ng elaphe3==0.2.0 # via -r dependencies/pip/requirements.in @@ -59,6 +60,7 @@ gitpython==3.1.7 # via transifex-client httplib2==0.18.1 # via -r dependencies/pip/requirements.in idna==2.10 # via requests jdcal==1.4.1 # via openpyxl +jmespath==0.10.0 # via boto3, botocore jsonfield==3.1.0 # via -r dependencies/pip/requirements.in jsonschema==3.2.0 # via formpack kombu==4.6.11 # via celery @@ -66,7 +68,6 @@ linecache2==1.0.0 # via traceback2 lxml==4.5.2 # via -r dependencies/pip/requirements.in, formpack, gdata-python3, pyquery markdown==3.2.2 # via -r dependencies/pip/requirements.in modilabs-python-utils==0.1.5 # via -r dependencies/pip/requirements.in -nose==1.3.7 # via django-nose numpy==1.19.0 # via pandas oauthlib==3.1.0 # via django-oauth-toolkit openpyxl==3.0.4 # via -r dependencies/pip/requirements.in @@ -79,14 +80,15 @@ pymongo==3.10.1 # via -r dependencies/pip/requirements.in pyquery==1.4.1 # via formpack pyrsistent==0.16.0 # via jsonschema python-crontab==2.5.1 # via django-celery-beat -python-dateutil==2.8.1 # via pandas, python-crontab +python-dateutil==2.8.1 # via botocore, pandas, python-crontab python-slugify==4.0.1 # via transifex-client pytz==2020.1 # via -r dependencies/pip/requirements.in, celery, django, django-timezone-field, pandas pyxform==0.15.1 # via -r dependencies/pip/requirements.in, formpack -raven==6.10.0 # via -r dependencies/pip/requirements.in redis==3.5.3 # via -r dependencies/pip/requirements.in, celery, django-redis-sessions requests==2.24.0 # via django-oauth-toolkit, transifex-client +s3transfer==0.3.3 # via boto3 https://bitbucket.org/fomcl/savreaderwriter/downloads/savReaderWriter-3.3.0.zip#egg=savreaderwriter # via -r dependencies/pip/requirements.in +sentry-sdk==0.16.5 # via -r dependencies/pip/requirements.in simplejson==3.17.2 # via -r dependencies/pip/requirements.in six==1.15.0 # via django-extensions, django-templated-email, djangorestframework-csv, ecdsa, jsonschema, pyrsistent, python-dateutil, ssrf-protect, transifex-client, unittest2 smmap==3.0.4 # via gitdb @@ -98,7 +100,7 @@ traceback2==1.4.0 # via unittest2 transifex-client==0.13.11 # via -r dependencies/pip/requirements.in unicodecsv==0.14.1 # via djangorestframework-csv, pyxform unittest2==1.1.0 # via pyxform -urllib3==1.25.9 # via requests, transifex-client +urllib3==1.25.9 # via botocore, requests, sentry-sdk, transifex-client vine==1.3.0 # via amqp, celery xlrd==1.2.0 # via -r dependencies/pip/requirements.in, pyxform xlsxwriter==1.2.9 # via formpack From 0cdddf8543b00beaca3b4a7853bbc3e6653d71b8 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Wed, 19 Aug 2020 13:17:20 -0400 Subject: [PATCH 06/18] Reorganized settings --- onadata/celery.py | 15 +- onadata/settings/base.py | 647 +++++++++++++++++++----------------- onadata/settings/dev.py | 16 +- onadata/settings/prod.py | 114 +------ onadata/settings/testing.py | 61 +++- 5 files changed, 399 insertions(+), 454 deletions(-) diff --git a/onadata/celery.py b/onadata/celery.py index b907bda2d..b0acb3040 100644 --- a/onadata/celery.py +++ b/onadata/celery.py @@ -12,22 +12,9 @@ PROJECT_NAME = os.path.basename(os.path.dirname(__file__)) # Set the default Django settings module for the 'celery' command-line program -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'onadata.settings.kc_environ') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'onadata.settings.prod') Celery = celery.Celery -if hasattr(settings, 'RAVEN_CONFIG'): - from raven.contrib.celery import register_signal, register_logger_signal - from raven.contrib.django.raven_compat.models import client as raven_client - - # Log to Sentry from Celery jobs per - # https://docs.getsentry.com/hosted/clients/python/integrations/celery/ - class RavenCelery(celery.Celery): - def on_configure(self): - # register a custom filter to filter out duplicate logs - register_logger_signal(raven_client, loglevel=logging.WARNING) - # hook into the Celery error handler - register_signal(raven_client) - Celery = RavenCelery app = Celery(PROJECT_NAME) # Using a string here means the worker will not have to diff --git a/onadata/settings/base.py b/onadata/settings/base.py index 985154624..a219e0b40 100644 --- a/onadata/settings/base.py +++ b/onadata/settings/base.py @@ -4,21 +4,42 @@ import os import sys from datetime import timedelta +from urllib.parse import quote_plus -import sentry_sdk import dj_database_url from django.core.exceptions import SuspiciousOperation -from django.utils.six.moves.urllib.parse import quote_plus from pymongo import MongoClient -from pyxform.xform2json import logger -from sentry_sdk.integrations.django import DjangoIntegration +def skip_suspicious_operations(record): + """Prevent django from sending 500 error + email notifications for SuspiciousOperation + events, since they are not true server errors, + especially when related to the ALLOWED_HOSTS + configuration + + background and more information: + http://www.tiwoc.de/blog/2013/03/django-prevent-email-notification-on-suspiciousoperation/ + """ + if record.exc_info: + exc_value = record.exc_info[1] + if isinstance(exc_value, SuspiciousOperation): + return False + return True + BASE_DIR = os.path.dirname(os.path.dirname(__file__)) ONADATA_DIR = BASE_DIR PROJECT_ROOT = os.path.abspath(os.path.join(ONADATA_DIR, '..')) -PRINT_EXCEPTION = False +################################ +# Django Framework settings # +################################ + +# Django `SECRET_KEY` +try: + SECRET_KEY = os.environ['DJANGO_SECRET_KEY'] +except KeyError: + raise Exception('DJANGO_SECRET_KEY must be set in the environment.') TEMPLATED_EMAIL_TEMPLATE_DIR = 'templated_email/' @@ -39,13 +60,12 @@ # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'America/New_York' +USE_TZ = True # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'en-us' -ugettext = lambda s: s - SITE_ID = os.environ.get('DJANGO_SITE_ID', '1') # If you set this to False, Django will make some optimizations so as not @@ -71,60 +91,20 @@ # Example: "http://media.lawrence.com/static/" STATIC_URL = '/static/' -# Enketo URL. -# Configurable settings. -ENKETO_URL = os.environ.get('ENKETO_URL', 'https://enketo.kobotoolbox.org') -KOBOCAT_URL = os.environ.get('KOBOCAT_URL', 'https://kc.kobotoolbox.org') - - -ENKETO_URL = ENKETO_URL.rstrip('/') -ENKETO_API_TOKEN = os.environ.get('ENKETO_API_TOKEN', 'enketorules') -ENKETO_VERSION = 'express' - -# Constants. -ENKETO_API_ENDPOINT_ONLINE_SURVEYS = '/survey' -ENKETO_API_ENDPOINT_OFFLINE_SURVEYS = '/survey/offline' -ENKETO_API_ENDPOINT_INSTANCE = '/instance' -ENKETO_API_ENDPOINT_INSTANCE_IFRAME = '/instance/iframe' - -# Computed settings. -ENKETO_API_ROOT = '/api/v2' -ENKETO_OFFLINE_SURVEYS = os.environ.get('ENKETO_OFFLINE_SURVEYS', 'True').lower() == 'true' -ENKETO_API_ENDPOINT_PREVIEW = '/preview' -ENKETO_API_ENDPOINT_SURVEYS = ENKETO_API_ENDPOINT_OFFLINE_SURVEYS if ENKETO_OFFLINE_SURVEYS \ - else ENKETO_API_ENDPOINT_ONLINE_SURVEYS - -ENKETO_API_SURVEY_PATH = ENKETO_API_ROOT + ENKETO_API_ENDPOINT_SURVEYS -ENKETO_API_INSTANCE_PATH = ENKETO_API_ROOT + ENKETO_API_ENDPOINT_INSTANCE -ENKETO_PREVIEW_URL = ENKETO_URL + ENKETO_API_ENDPOINT_PREVIEW -ENKETO_API_INSTANCE_IFRAME_URL = ENKETO_URL + ENKETO_API_ROOT + ENKETO_API_ENDPOINT_INSTANCE_IFRAME - -# specifically for site urls sent to enketo for form retrieval -# `ENKETO_PROTOCOL` variable is overridden when internal domain name is used. -# All internal communications between containers must be HTTP only. -ENKETO_PROTOCOL = os.environ.get('ENKETO_PROTOCOL', 'https') - -KPI_URL = os.environ.get('KPI_URL', False) -KPI_INTERNAL_URL = os.environ.get("KPI_INTERNAL_URL", KPI_URL) -KPI_HOOK_ENDPOINT_PATTERN = '/api/v2/assets/{asset_uid}/hook-signal/' - -# These 2 variables are needed to detect whether the ENKETO_PROTOCOL should overwritten or not. -# See method `_get_form_url` in `onadata/libs/utils/viewer_tools.py` -KOBOCAT_INTERNAL_HOSTNAME = "{}.{}".format( - os.environ.get("KOBOCAT_PUBLIC_SUBDOMAIN", "kc"), - os.environ.get("INTERNAL_DOMAIN_NAME", "docker.internal")) -KOBOCAT_PUBLIC_HOSTNAME = "{}.{}".format( - os.environ.get("KOBOCAT_PUBLIC_SUBDOMAIN", "kc"), - os.environ.get("PUBLIC_DOMAIN_NAME", "kobotoolbox.org")) - -# Default value for the `UserProfile.require_auth` attribute. Even though it's -# set in kc_environ, include it here as well to support legacy installations -REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT = False - # Login URLs LOGIN_URL = '/accounts/login/' LOGIN_REDIRECT_URL = '/login_redirect/' + +if os.environ.get('KOBOCAT_ROOT_URI_PREFIX'): + KOBOCAT_ROOT_URI_PREFIX = '/' + os.environ['KOBOCAT_ROOT_URI_PREFIX'].strip('/') + '/' + MEDIA_URL = KOBOCAT_ROOT_URI_PREFIX + MEDIA_URL.lstrip('/') + STATIC_URL = KOBOCAT_ROOT_URI_PREFIX + STATIC_URL.lstrip('/') + LOGIN_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_URL.lstrip('/') + LOGIN_REDIRECT_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_REDIRECT_URL.lstrip('/') + +MEDIA_ROOT = os.path.join(PROJECT_ROOT, MEDIA_URL.lstrip('/')) + # URL prefix for admin static files -- CSS, JavaScript and images. # Make sure to use a trailing slash. # Examples: "http://foo.com/static/admin/", "/static/admin/". @@ -135,7 +115,6 @@ STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ] MIDDLEWARE = [ @@ -155,7 +134,6 @@ ] ROOT_URLCONF = 'onadata.apps.main.urls' -USE_TZ = True # specify the root folder which may contain a templates folder and a static # folder used to override templates for site specific details @@ -192,7 +170,8 @@ 'loaders': [ 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', - ] + ], + 'debug': os.environ.get('TEMPLATE_DEBUG', 'False') == 'True', }, } ] @@ -210,7 +189,6 @@ os.path.join(TEMPLATE_OVERRIDE_ROOT_DIR, 'static') ] - # needed by guardian ANONYMOUS_USER_ID = -1 @@ -229,7 +207,6 @@ 'django.contrib.gis', 'registration', 'reversion', - 'django_nose', 'django_digest', 'corsheaders', 'oauth2_provider', @@ -251,101 +228,10 @@ 'django_extensions', ] -OAUTH2_PROVIDER = { - # this is the list of available scopes - 'SCOPES': { - 'read': 'Read scope', - 'write': 'Write scope', - 'groups': 'Access to your groups'} -} - -REST_FRAMEWORK = { - # Use hyperlinked styles by default. - # Only used if the `serializer_class` attribute is not set on a view. - 'DEFAULT_MODEL_SERIALIZER_CLASS': - 'rest_framework.serializers.HyperlinkedModelSerializer', - - # Use Django's standard `django.contrib.auth` permissions, - # or allow read-only access for unauthenticated users. - 'DEFAULT_PERMISSION_CLASSES': [ - 'rest_framework.permissions.AllowAny', - ], - 'DEFAULT_AUTHENTICATION_CLASSES': ( - 'onadata.libs.authentication.DigestAuthentication', - 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', - 'rest_framework.authentication.SessionAuthentication', - 'rest_framework.authentication.TokenAuthentication', - 'onadata.libs.authentication.HttpsOnlyBasicAuthentication', - ), - 'DEFAULT_RENDERER_CLASSES': ( - # Keep JSONRenderer at the top "in order to send JSON responses to - # clients that do not specify an Accept header." See - # http://www.django-rest-framework.org/api-guide/renderers/#ordering-of-renderer-classes - 'rest_framework.renderers.JSONRenderer', - 'rest_framework_jsonp.renderers.JSONPRenderer', - 'rest_framework.renderers.BrowsableAPIRenderer', - 'rest_framework_xml.renderers.XMLRenderer', - 'rest_framework_csv.renderers.CSVRenderer', - ), - 'VIEW_NAME_FUNCTION': 'onadata.apps.api.tools.get_view_name', - 'VIEW_DESCRIPTION_FUNCTION': 'onadata.apps.api.tools.get_view_description', -} - -SWAGGER_SETTINGS = { - "exclude_namespaces": [], # List URL namespaces to ignore - "api_version": '1.0', # Specify your API's version (optional) - "enabled_methods": [ # Methods to enable in UI - 'get', - 'post', - 'put', - 'patch', - 'delete' - ], -} - -CORS_ORIGIN_ALLOW_ALL = False -CORS_ALLOW_CREDENTIALS = True -CORS_ORIGIN_WHITELIST = ( - 'http://kc.kobo.local', -) - USE_THOUSAND_SEPARATOR = True COMPRESS = True -# extra data stored with users -AUTH_PROFILE_MODULE = 'onadata.apps.main.UserProfile' - -AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.ModelBackend', - 'guardian.backends.ObjectPermissionBackend', -) - -# All registration should be done through KPI, so Django Registration should -# never be enabled here. It'd be best to remove all references to the -# `registration` app in the future. -REGISTRATION_OPEN = False -ACCOUNT_ACTIVATION_DAYS = 1 - - -def skip_suspicious_operations(record): - """Prevent django from sending 500 error - email notifications for SuspiciousOperation - events, since they are not true server errors, - especially when related to the ALLOWED_HOSTS - configuration - - background and more information: - http://www.tiwoc.de/blog/2013/03/django-prevent-email-notification-on-susp\ - iciousoperation/ - """ - if record.exc_info: - exc_value = record.exc_info[1] - if isinstance(exc_value, SuspiciousOperation): - return False - return True - - # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. @@ -411,76 +297,219 @@ def skip_suspicious_operations(record): } } -GOOGLE_STEP2_URI = 'http://ona.io/gwelcome' -GOOGLE_CLIENT_ID = '617113120802.onadata.apps.googleusercontent.com' -GOOGLE_CLIENT_SECRET = '9reM29qpGFPyI8TBuB54Z4fk' +# extra data stored with users +AUTH_PROFILE_MODULE = 'onadata.apps.main.UserProfile' -THUMB_CONF = { - 'large': {'size': 1280, 'suffix': '-large'}, - 'medium': {'size': 640, 'suffix': '-medium'}, - 'small': {'size': 240, 'suffix': '-small'}, -} -# order of thumbnails from largest to smallest -THUMB_ORDER = ['large', 'medium', 'small'] +AUTHENTICATION_BACKENDS = ( + 'django.contrib.auth.backends.ModelBackend', + 'guardian.backends.ObjectPermissionBackend', +) -# Number of times Celery retries to send data to external rest service -REST_SERVICE_MAX_RETRIES = 3 +# Make Django use NGINX $host. Useful when running with ./manage.py runserver_plus +# It avoids adding the debugger webserver port (i.e. `:8000`) at the end of urls. +if os.getenv("USE_X_FORWARDED_HOST", "False") == "True": + USE_X_FORWARDED_HOST = True -# celery -CELERY_BROKER_URL = os.environ.get( - 'KOBOCAT_BROKER_URL', 'redis://localhost:6389/2') +# "Although the setting offers little practical benefit, it's sometimes +# required by security auditors." +# -- https://docs.djangoproject.com/en/2.2/ref/settings/#csrf-cookie-httponly +CSRF_COOKIE_HTTPONLY = True +# SESSION_COOKIE_HTTPONLY is more useful, but it defaults to True. -CELERY_RESULT_BACKEND = CELERY_BROKER_URL +if os.environ.get('PUBLIC_REQUEST_SCHEME', '').lower() == 'https': + SESSION_COOKIE_SECURE = True + CSRF_COOKIE_SECURE = True -CELERY_TASK_ALWAYS_EAGER = os.environ.get('SKIP_CELERY', 'False') == 'True' +# Limit sessions to 1 week (the default is 2 weeks) +SESSION_COOKIE_AGE = 604800 -# Celery defaults to having as many workers as there are cores. To avoid -# excessive resource consumption, don't spawn more than 6 workers by default -# even if there more than 6 cores. -CELERY_WORKER_MAX_CONCURRENCY = int(os.environ.get('CELERYD_MAX_CONCURRENCY', 6)) -if multiprocessing.cpu_count() > CELERY_WORKER_MAX_CONCURRENCY: - CELERY_WORKER_CONCURRENCY = CELERY_WORKER_MAX_CONCURRENCY +# The maximum size in bytes that a request body may be before a SuspiciousOperation (RequestDataTooBig) is raised +# This variable is available only in Django 1.10+. Only there for next upgrade +DATA_UPLOAD_MAX_MEMORY_SIZE = 10485760 -# Replace a worker after it completes 7 tasks by default. This allows the OS to -# reclaim memory allocated during large tasks -CELERY_WORKER_MAX_TASKS_PER_CHILD = int(os.environ.get( - 'CELERYD_MAX_TASKS_PER_CHILD', 7)) +# The maximum size (in bytes) that an upload will be before it gets streamed to the file system +FILE_UPLOAD_MAX_MEMORY_SIZE = 10485760 -# Default to a 30-minute soft time limit and a 35-minute hard time limit -CELERY_TASK_TIME_LIMIT = int(os.environ.get('CELERY_TASK_TIME_LIMIT', 2100)) -CELERY_TASK_SOFT_TIME_LIMIT = int(os.environ.get( - 'CELERYD_TASK_SOFT_TIME_LIMIT', 1800)) +LOCALE_PATHS = [os.path.join(PROJECT_ROOT, 'locale'), ] -CELERY_BROKER_TRANSPORT_OPTIONS = { - "fanout_patterns": True, - "fanout_prefix": True, - # http://docs.celeryproject.org/en/latest/getting-started/brokers/redis.html#redis-visibility-timeout - "visibility_timeout": 120 * (10 ** REST_SERVICE_MAX_RETRIES) # Longest ETA for RestService -} +DEBUG = os.environ.get('DJANGO_DEBUG', 'True') == 'True' -CELERY_BEAT_SCHEDULE = { - # Periodically mark exports stuck in the "pending" state as "failed" - # See https://github.com/kobotoolbox/kobocat/issues/315 - 'log-stuck-exports-and-mark-failed': { - 'task': 'onadata.apps.viewer.tasks.log_stuck_exports_and_mark_failed', - 'schedule': timedelta(hours=6), - 'options': {'queue': 'kobocat_queue'} - }, +# Database (i.e. PostgreSQL) +DATABASES = { + 'default': dj_database_url.config(default="sqlite:///%s/db.sqlite3" % PROJECT_ROOT) } +# Replacement for TransactionMiddleware +DATABASES['default']['ATOMIC_REQUESTS'] = True -CELERY_TASK_DEFAULT_QUEUE = "kobocat_queue" - -# duration to keep zip exports before deletion (in seconds) -ZIP_EXPORT_COUNTDOWN = 24 * 60 * 60 +ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS', '*').split(' ') -# default content length for submission requests -DEFAULT_CONTENT_LENGTH = 10000000 +# Domain must not exclude KPI when sharing sessions +if os.environ.get('SESSION_COOKIE_DOMAIN'): + SESSION_COOKIE_DOMAIN = os.environ['SESSION_COOKIE_DOMAIN'] + SESSION_COOKIE_NAME = 'kobonaut' -# re-captcha in registrations -REGISTRATION_REQUIRE_CAPTCHA = False -RECAPTCHA_USE_SSL = False -RECAPTCHA_PRIVATE_KEY = '' -RECAPTCHA_PUBLIC_KEY = '6Ld52OMSAAAAAJJ4W-0TFDTgbznnWWFf0XuOSaB6' +SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' + +# If not properly overridden, leave uninitialized so Django can set the default. +# (see https://docs.djangoproject.com/en/1.8/ref/settings/#default-file-storage) +if os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE'): + DEFAULT_FILE_STORAGE = os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE') + +EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', + 'django.core.mail.backends.filebased.EmailBackend') + +if EMAIL_BACKEND == 'django.core.mail.backends.filebased.EmailBackend': + EMAIL_FILE_PATH = os.environ.get( + 'EMAIL_FILE_PATH', os.path.join(PROJECT_ROOT, 'emails')) + if not os.path.isdir(EMAIL_FILE_PATH): + os.mkdir(EMAIL_FILE_PATH) + + +################################### +# Django Rest Framework settings # +################################### + +REST_FRAMEWORK = { + # Use hyperlinked styles by default. + # Only used if the `serializer_class` attribute is not set on a view. + 'DEFAULT_MODEL_SERIALIZER_CLASS': + 'rest_framework.serializers.HyperlinkedModelSerializer', + + # Use Django's standard `django.contrib.auth` permissions, + # or allow read-only access for unauthenticated users. + 'DEFAULT_PERMISSION_CLASSES': [ + 'rest_framework.permissions.AllowAny', + ], + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'onadata.libs.authentication.DigestAuthentication', + 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', + 'rest_framework.authentication.SessionAuthentication', + 'rest_framework.authentication.TokenAuthentication', + 'onadata.libs.authentication.HttpsOnlyBasicAuthentication', + ), + 'DEFAULT_RENDERER_CLASSES': ( + # Keep JSONRenderer at the top "in order to send JSON responses to + # clients that do not specify an Accept header." See + # http://www.django-rest-framework.org/api-guide/renderers/#ordering-of-renderer-classes + 'rest_framework.renderers.JSONRenderer', + 'rest_framework_jsonp.renderers.JSONPRenderer', + 'rest_framework.renderers.BrowsableAPIRenderer', + 'rest_framework_xml.renderers.XMLRenderer', + 'rest_framework_csv.renderers.CSVRenderer', + ), + 'VIEW_NAME_FUNCTION': 'onadata.apps.api.tools.get_view_name', + 'VIEW_DESCRIPTION_FUNCTION': 'onadata.apps.api.tools.get_view_description', +} + +################################ +# KoBoCAT settings # +################################ + +TESTING_MODE = False + +PRINT_EXCEPTION = os.environ.get("PRINT_EXCEPTION", False) + +KOBOFORM_SERVER = os.environ.get("KOBOFORM_SERVER", "localhost") +KOBOFORM_SERVER_PORT = os.environ.get("KOBOFORM_SERVER_PORT", "8000") +KOBOFORM_SERVER_PROTOCOL = os.environ.get("KOBOFORM_SERVER_PROTOCOL", "http") +KOBOFORM_LOGIN_AUTOREDIRECT = True +KOBOFORM_URL = os.environ.get("KOBOFORM_URL", "http://kf.kobo.local") +KOBOCAT_URL = os.environ.get("KOBOCAT_URL", "http://kc.kobo.local") +KPI_URL = os.environ.get('KPI_URL', False) +KPI_INTERNAL_URL = os.environ.get("KPI_INTERNAL_URL", KPI_URL) +KPI_HOOK_ENDPOINT_PATTERN = '/api/v2/assets/{asset_uid}/hook-signal/' + +# These 2 variables are needed to detect whether the ENKETO_PROTOCOL should overwritten or not. +# See method `_get_form_url` in `onadata/libs/utils/viewer_tools.py` +KOBOCAT_INTERNAL_HOSTNAME = "{}.{}".format( + os.environ.get("KOBOCAT_PUBLIC_SUBDOMAIN", "kc"), + os.environ.get("INTERNAL_DOMAIN_NAME", "docker.internal")) +KOBOCAT_PUBLIC_HOSTNAME = "{}.{}".format( + os.environ.get("KOBOCAT_PUBLIC_SUBDOMAIN", "kc"), + os.environ.get("PUBLIC_DOMAIN_NAME", "kobotoolbox.org")) + +# Default value for the `UserProfile.require_auth` attribute +REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT = os.environ.get( + 'REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT', + 'False') == 'True' + +OAUTH2_PROVIDER = { + # this is the list of available scopes + 'SCOPES': { + 'read': 'Read scope', + 'write': 'Write scope', + 'groups': 'Access to your groups'} +} + +# All registration should be done through KPI, so Django Registration should +# never be enabled here. It'd be best to remove all references to the +# `registration` app in the future. +REGISTRATION_OPEN = False +ACCOUNT_ACTIVATION_DAYS = 1 + +SWAGGER_SETTINGS = { + "exclude_namespaces": [], # List URL namespaces to ignore + "api_version": '1.0', # Specify your API's version (optional) + "enabled_methods": [ # Methods to enable in UI + 'get', + 'post', + 'put', + 'patch', + 'delete' + ], +} + +# CORS policies +CORS_ORIGIN_ALLOW_ALL = False +CORS_ALLOW_CREDENTIALS = True +CORS_ORIGIN_WHITELIST = ( + 'http://kc.kobo.local', +) + +# ToDo Remove when `kobokitten-remove-ui-CUD-actions-unicode` is merged +GOOGLE_STEP2_URI = 'http://ona.io/gwelcome' +GOOGLE_CLIENT_ID = '617113120802.onadata.apps.googleusercontent.com' +GOOGLE_CLIENT_SECRET = '9reM29qpGFPyI8TBuB54Z4fk' + +THUMB_CONF = { + 'large': {'size': 1280, 'suffix': '-large'}, + 'medium': {'size': 640, 'suffix': '-medium'}, + 'small': {'size': 240, 'suffix': '-small'}, +} +# order of thumbnails from largest to smallest +THUMB_ORDER = ['large', 'medium', 'small'] + +# Number of times Celery retries to send data to external rest service +REST_SERVICE_MAX_RETRIES = 3 + +# BEGIN external service integration codes +AWS_ACCESS_KEY_ID = os.environ.get('KOBOCAT_AWS_ACCESS_KEY_ID') +AWS_SECRET_ACCESS_KEY = os.environ.get('KOBOCAT_AWS_SECRET_ACCESS_KEY') +AWS_STORAGE_BUCKET_NAME = os.environ.get('KOBOCAT_AWS_STORAGE_BUCKET_NAME') +AWS_DEFAULT_ACL = 'private' +AWS_S3_FILE_BUFFER_SIZE = 50 * 1024 * 1024 + +# TODO pass these variables from `kobo-docker` envfiles +AWS_QUERYSTRING_EXPIRE = os.environ.get("KOBOCAT_AWS_QUERYSTRING_EXPIRE", 3600) +AWS_S3_USE_SSL = os.environ.get("KOBOCAT_AWS_S3_USE_SSL", True) +AWS_S3_HOST = os.environ.get("KOBOCAT_AWS_S3_HOST", "s3.amazonaws.com") + +GOOGLE_ANALYTICS_PROPERTY_ID = os.environ.get("GOOGLE_ANALYTICS_TOKEN", False) +GOOGLE_ANALYTICS_DOMAIN = "auto" + +# END external service integration codes +# duration to keep zip exports before deletion (in seconds) +ZIP_EXPORT_COUNTDOWN = 24 * 60 * 60 + +# default content length for submission requests +DEFAULT_CONTENT_LENGTH = 10000000 + +# TODO pass these variables from `kobo-docker` envfiles +# re-captcha in registrations +REGISTRATION_REQUIRE_CAPTCHA = False +RECAPTCHA_USE_SSL = False +RECAPTCHA_PRIVATE_KEY = '' +RECAPTCHA_PUBLIC_KEY = '6Ld52OMSAAAAAJJ4W-0TFDTgbznnWWFf0XuOSaB6' # Use 1 or 0 for multiple selects instead of True or False for csv, xls exports BINARY_SELECT_MULTIPLES = False @@ -488,9 +517,6 @@ def skip_suspicious_operations(record): # Use 'n/a' for empty values by default on csv exports NA_REP = 'n/a' -# Set wsgi url scheme to HTTPS -os.environ['wsgi.url_scheme'] = 'https' - SUPPORTED_MEDIA_UPLOAD_TYPES = [ 'image/jpeg', 'image/png', @@ -522,32 +548,92 @@ def skip_suspicious_operations(record): }, ] -# Make Django use NGINX $host. Useful when running with ./manage.py runserver_plus -# It avoids adding the debugger webserver port (i.e. `:8000`) at the end of urls. -if os.getenv("USE_X_FORWARDED_HOST", "False") == "True": - USE_X_FORWARDED_HOST = True +################################ +# Celery settings # +################################ -# "Although the setting offers little practical benefit, it's sometimes -# required by security auditors." -# -- https://docs.djangoproject.com/en/2.2/ref/settings/#csrf-cookie-httponly -CSRF_COOKIE_HTTPONLY = True -# SESSION_COOKIE_HTTPONLY is more useful, but it defaults to True. +CELERY_BROKER_URL = os.environ.get( + 'KOBOCAT_BROKER_URL', 'redis://localhost:6389/2') -if os.environ.get('PUBLIC_REQUEST_SCHEME', '').lower() == 'https': - SESSION_COOKIE_SECURE = True - CSRF_COOKIE_SECURE = True +CELERY_RESULT_BACKEND = CELERY_BROKER_URL -# Limit sessions to 1 week (the default is 2 weeks) -SESSION_COOKIE_AGE = 604800 +CELERY_TASK_ALWAYS_EAGER = os.environ.get('SKIP_CELERY', 'False') == 'True' -# The maximum size in bytes that a request body may be before a SuspiciousOperation (RequestDataTooBig) is raised -# This variable is available only in Django 1.10+. Only there for next upgrade -DATA_UPLOAD_MAX_MEMORY_SIZE = 10485760 +# Celery defaults to having as many workers as there are cores. To avoid +# excessive resource consumption, don't spawn more than 6 workers by default +# even if there more than 6 cores. +CELERY_WORKER_MAX_CONCURRENCY = int(os.environ.get('CELERYD_MAX_CONCURRENCY', 6)) +if multiprocessing.cpu_count() > CELERY_WORKER_MAX_CONCURRENCY: + CELERY_WORKER_CONCURRENCY = CELERY_WORKER_MAX_CONCURRENCY + +# Replace a worker after it completes 7 tasks by default. This allows the OS to +# reclaim memory allocated during large tasks +CELERY_WORKER_MAX_TASKS_PER_CHILD = int(os.environ.get( + 'CELERYD_MAX_TASKS_PER_CHILD', 7)) + +# Default to a 30-minute soft time limit and a 35-minute hard time limit +CELERY_TASK_TIME_LIMIT = int(os.environ.get('CELERY_TASK_TIME_LIMIT', 2100)) +CELERY_TASK_SOFT_TIME_LIMIT = int(os.environ.get( + 'CELERYD_TASK_SOFT_TIME_LIMIT', 1800)) + +CELERY_BROKER_TRANSPORT_OPTIONS = { + "fanout_patterns": True, + "fanout_prefix": True, + # http://docs.celeryproject.org/en/latest/getting-started/brokers/redis.html#redis-visibility-timeout + "visibility_timeout": 120 * (10 ** REST_SERVICE_MAX_RETRIES) # Longest ETA for RestService +} + +CELERY_BEAT_SCHEDULE = { + # Periodically mark exports stuck in the "pending" state as "failed" + # See https://github.com/kobotoolbox/kobocat/issues/315 + 'log-stuck-exports-and-mark-failed': { + 'task': 'onadata.apps.viewer.tasks.log_stuck_exports_and_mark_failed', + 'schedule': timedelta(hours=6), + 'options': {'queue': 'kobocat_queue'} + }, +} + +CELERY_TASK_DEFAULT_QUEUE = "kobocat_queue" + + +################################ +# Enketo Express settings # +################################ + +ENKETO_URL = os.environ.get('ENKETO_URL', 'https://enketo.kobotoolbox.org') + +ENKETO_URL = ENKETO_URL.rstrip('/') +ENKETO_API_TOKEN = os.environ.get('ENKETO_API_TOKEN', 'enketorules') +ENKETO_VERSION = 'express' + +# Constants. +ENKETO_API_ENDPOINT_ONLINE_SURVEYS = '/survey' +ENKETO_API_ENDPOINT_OFFLINE_SURVEYS = '/survey/offline' +ENKETO_API_ENDPOINT_INSTANCE = '/instance' +ENKETO_API_ENDPOINT_INSTANCE_IFRAME = '/instance/iframe' + +# Computed settings. +ENKETO_API_ROOT = '/api/v2' +ENKETO_OFFLINE_SURVEYS = os.environ.get('ENKETO_OFFLINE_SURVEYS', 'True').lower() == 'true' +ENKETO_API_ENDPOINT_PREVIEW = '/preview' +ENKETO_API_ENDPOINT_SURVEYS = ENKETO_API_ENDPOINT_OFFLINE_SURVEYS if ENKETO_OFFLINE_SURVEYS \ + else ENKETO_API_ENDPOINT_ONLINE_SURVEYS + +ENKETO_API_SURVEY_PATH = ENKETO_API_ROOT + ENKETO_API_ENDPOINT_SURVEYS +ENKETO_API_INSTANCE_PATH = ENKETO_API_ROOT + ENKETO_API_ENDPOINT_INSTANCE +ENKETO_PREVIEW_URL = ENKETO_URL + ENKETO_API_ENDPOINT_PREVIEW +ENKETO_API_INSTANCE_IFRAME_URL = ENKETO_URL + ENKETO_API_ROOT + ENKETO_API_ENDPOINT_INSTANCE_IFRAME + +# specifically for site urls sent to enketo for form retrieval +# `ENKETO_PROTOCOL` variable is overridden when internal domain name is used. +# All internal communications between containers must be HTTP only. +ENKETO_PROTOCOL = os.environ.get('ENKETO_PROTOCOL', 'https') -# The maximum size (in bytes) that an upload will be before it gets streamed to the file system -FILE_UPLOAD_MAX_MEMORY_SIZE = 10485760 -# MongoDB +################################ +# MongoDB settings # +################################ + MONGO_DATABASE = { 'HOST': os.environ.get('KOBOCAT_MONGO_HOST', 'mongo'), 'PORT': int(os.environ.get('KOBOCAT_MONGO_PORT', 27017)), @@ -575,91 +661,34 @@ def skip_suspicious_operations(record): MONGO_DB = MONGO_CONNECTION[MONGO_DATABASE['NAME']] -LOCALE_PATHS = [os.path.join(PROJECT_ROOT, 'locale'), ] - -DEBUG = os.environ.get('DJANGO_DEBUG', 'True') == 'True' -TEMPLATE_DEBUG = os.environ.get('TEMPLATE_DEBUG', 'True') == 'True' - -# Database (i.e. PostgreSQL) -DATABASES = { - 'default': dj_database_url.config(default="sqlite:///%s/db.sqlite3" % PROJECT_ROOT) -} -# Replacement for TransactionMiddleware -DATABASES['default']['ATOMIC_REQUESTS'] = True - -# Django `SECRET_KEY` -try: - SECRET_KEY = os.environ['DJANGO_SECRET_KEY'] -except KeyError: - raise Exception('DJANGO_SECRET_KEY must be set in the environment.') - -ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS', '*').split(' ') - -TESTING_MODE = False - -# Domain must not exclude KPI when sharing sessions -if os.environ.get('SESSION_COOKIE_DOMAIN'): - SESSION_COOKIE_DOMAIN = os.environ['SESSION_COOKIE_DOMAIN'] - SESSION_COOKIE_NAME = 'kobonaut' -SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' +################################ +# Sentry settings # +################################ -KOBOFORM_SERVER = os.environ.get("KOBOFORM_SERVER", "localhost") -KOBOFORM_SERVER_PORT = os.environ.get("KOBOFORM_SERVER_PORT", "8000") -KOBOFORM_SERVER_PROTOCOL = os.environ.get("KOBOFORM_SERVER_PROTOCOL", "http") -KOBOFORM_LOGIN_AUTOREDIRECT = True -KOBOFORM_URL = os.environ.get("KOBOFORM_URL", "http://kf.kobo.local") -KOBOCAT_URL = os.environ.get("KOBOCAT_URL", "http://kc.kobo.local") +if (os.getenv("RAVEN_DSN") or "") != "": + import sentry_sdk + from sentry_sdk.integrations.django import DjangoIntegration + from sentry_sdk.integrations.celery import CeleryIntegration + from sentry_sdk.integrations.logging import LoggingIntegration -# BEGIN external service integration codes -AWS_ACCESS_KEY_ID = os.environ.get('KOBOCAT_AWS_ACCESS_KEY_ID') -AWS_SECRET_ACCESS_KEY = os.environ.get('KOBOCAT_AWS_SECRET_ACCESS_KEY') -AWS_STORAGE_BUCKET_NAME = os.environ.get('KOBOCAT_AWS_STORAGE_BUCKET_NAME') -AWS_DEFAULT_ACL = 'private' -AWS_S3_FILE_BUFFER_SIZE = 50 * 1024 * 1024 - -# TODO pass these variables from `kobo-docker` envfiles -AWS_QUERYSTRING_EXPIRE = os.environ.get("KOBOCAT_AWS_QUERYSTRING_EXPIRE", 3600) -AWS_S3_USE_SSL = os.environ.get("KOBOCAT_AWS_S3_USE_SSL", True) -AWS_S3_HOST = os.environ.get("KOBOCAT_AWS_S3_HOST", "s3.amazonaws.com") - -GOOGLE_ANALYTICS_PROPERTY_ID = os.environ.get("GOOGLE_ANALYTICS_TOKEN", False) -GOOGLE_ANALYTICS_DOMAIN = "auto" -# END external service integration codes - -# If not properly overridden, leave uninitialized so Django can set the default. -# (see https://docs.djangoproject.com/en/1.8/ref/settings/#default-file-storage) -if os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE'): - DEFAULT_FILE_STORAGE = os.environ.get('KOBOCAT_DEFAULT_FILE_STORAGE') - -EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', - 'django.core.mail.backends.filebased.EmailBackend') - -if EMAIL_BACKEND == 'django.core.mail.backends.filebased.EmailBackend': - EMAIL_FILE_PATH = os.environ.get( - 'EMAIL_FILE_PATH', os.path.join(PROJECT_ROOT, 'emails')) - if not os.path.isdir(EMAIL_FILE_PATH): - os.mkdir(EMAIL_FILE_PATH) - -# Default value for the `UserProfile.require_auth` attribute -REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT = os.environ.get( - 'REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT', - 'False') == 'True' - -POSTGIS_VERSION = (2, 5, 4) - -if (os.getenv("SENTRY_DSN") or "") != "": + # All of this is already happening by default! + sentry_logging = LoggingIntegration( + level=logging.INFO, # Capture info and above as breadcrumbs + event_level=logging.ERROR # Send errors as events + ) sentry_sdk.init( - dsn=os.environ['SENTRY_DSN'], - integrations=[DjangoIntegration()], - - # If you wish to associate users to errors (assuming you are using - # django.contrib.auth) you may enable sending PII data. + dsn=os.environ['RAVEN_DSN'], + integrations=[ + DjangoIntegration(), + CeleryIntegration(), + sentry_logging + ], send_default_pii=True ) - # Monkey Patch PyXForm. @ToDo remove after upgrading to v1.1.0 +from pyxform.xform2json import logger logger.removeHandler(logging.NullHandler) logger.addHandler(logging.NullHandler()) diff --git a/onadata/settings/dev.py b/onadata/settings/dev.py index 1c64b5207..5e4547589 100644 --- a/onadata/settings/dev.py +++ b/onadata/settings/dev.py @@ -1,15 +1,15 @@ # coding: utf-8 -from .prod import * +from onadata.libs.utils.redis_helper import RedisHelper +from .base import * + +################################ +# Django Framework settings # +################################ -LOGGING['handlers']['console'] = { - 'level': 'DEBUG', - 'class': 'logging.StreamHandler', - 'formatter': 'verbose', - 'stream': sys.stdout, -} LOGGING['root'] = { 'handlers': ['console'], 'level': 'DEBUG' } -MIDDLEWARE.append('onadata.libs.utils.middleware.ExceptionLoggingMiddleware') +SESSION_ENGINE = "redis_sessions.session" +SESSION_REDIS = RedisHelper.config(default="redis://redis_cache:6380/2") diff --git a/onadata/settings/prod.py b/onadata/settings/prod.py index 57519af7b..e6384a998 100644 --- a/onadata/settings/prod.py +++ b/onadata/settings/prod.py @@ -1,114 +1,14 @@ # coding: utf-8 -from datetime import timedelta - - -from celery.signals import after_setup_logger - +from onadata.libs.utils.redis_helper import RedisHelper from .base import * +################################ +# Django Framework settings # +################################ -def celery_logger_setup_handler(logger, **kwargs): - """ - Allows logs to be written in celery.log when call - :param logger: - :param kwargs: - """ - my_handler = logging.FileHandler(os.getenv("KOBOCAT_CELERY_LOG_FILE", "/srv/logs/celery.log")) - my_handler.setLevel(logging.INFO) - my_formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') # custom formatter - my_handler.setFormatter(my_formatter) - logger.addHandler(my_handler) - - -if os.environ.get('KOBOCAT_ROOT_URI_PREFIX'): - KOBOCAT_ROOT_URI_PREFIX = '/' + os.environ['KOBOCAT_ROOT_URI_PREFIX'].strip('/') + '/' - MEDIA_URL = KOBOCAT_ROOT_URI_PREFIX + MEDIA_URL.lstrip('/') - STATIC_URL = KOBOCAT_ROOT_URI_PREFIX + STATIC_URL.lstrip('/') - LOGIN_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_URL.lstrip('/') - LOGIN_REDIRECT_URL = KOBOCAT_ROOT_URI_PREFIX + LOGIN_REDIRECT_URL.lstrip('/') - -MEDIA_ROOT = os.path.join(PROJECT_ROOT, MEDIA_URL.lstrip('/')) - -# Optional Sentry configuration: if desired, be sure to install Raven and set -# RAVEN_DSN in the environment -if (os.getenv("RAVEN_DSN") or "") != "": - try: - import raven - except ImportError: - print('Please install Raven to enable Sentry logging.') - else: - INSTALLED_APPS.append('raven.contrib.django.raven_compat') - RAVEN_CONFIG = { - 'dsn': os.environ['RAVEN_DSN'], - } - - # Set the `server_name` attribute. See https://docs.sentry.io/hosted/clients/python/advanced/ - server_name = os.environ.get('RAVEN_SERVER_NAME') - server_name = server_name or '.'.join([_f for _f in ( - os.environ.get('KOBOCAT_PUBLIC_SUBDOMAIN', None), - os.environ.get('PUBLIC_DOMAIN_NAME', None) - ) if _f]) - - if server_name: - RAVEN_CONFIG.update({'name': server_name}) - - try: - RAVEN_CONFIG['release'] = raven.fetch_git_sha(BASE_DIR) - except raven.exceptions.InvalidGitRepository: - pass - - # The below is NOT required for Sentry to log unhandled exceptions, but it - # is necessary for capturing messages sent via the `logging` module. - # https://docs.getsentry.com/hosted/clients/python/integrations/django/#integration-with-logging - LOGGING = { - 'version': 1, - 'disable_existing_loggers': True, # Follows Sentry docs; `False` contributes to a deadlock (issue #377) - 'root': { - 'level': 'WARNING', - 'handlers': ['sentry'], - }, - 'formatters': { - 'verbose': { - 'format': '%(levelname)s %(asctime)s %(module)s ' - '%(process)d %(thread)d %(message)s' - }, - }, - 'handlers': { - 'sentry': { - 'level': 'WARNING', - 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', - }, - 'console': { - 'level': 'DEBUG', - 'class': 'logging.StreamHandler', - 'formatter': 'verbose' - } - }, - 'loggers': { - 'django.db.backends': { - 'level': 'ERROR', - 'handlers': ['console'], - 'propagate': False, - }, - 'raven': { - 'level': 'DEBUG', - 'handlers': ['console'], - 'propagate': False, - }, - 'console_logger': { - 'handlers': ['console'], - 'level': 'DEBUG', - 'propagate': True - }, - 'sentry.errors': { - 'level': 'DEBUG', - 'handlers': ['console'], - 'propagate': False, - }, - }, - } - CELERY_WORKER_HIJACK_ROOT_LOGGER = False - after_setup_logger.connect(celery_logger_setup_handler) +# Force `DEBUG` and `TEMPLATE_DEBUG` to `False` +DEBUG = False +TEMPLATES[0]['OPTIONS']['debug'] = False SESSION_ENGINE = "redis_sessions.session" SESSION_REDIS = RedisHelper.config(default="redis://redis_cache:6380/2") diff --git a/onadata/settings/testing.py b/onadata/settings/testing.py index c01b655fc..9ff9a0bd9 100644 --- a/onadata/settings/testing.py +++ b/onadata/settings/testing.py @@ -1,9 +1,16 @@ # coding: utf-8 +import os + import dj_database_url from mongomock import MongoClient as MockMongoClient from .base import * +################################ +# Django Framework settings # +################################ + +# Database (i.e. PostgreSQL) DATABASES = { 'default': dj_database_url.config( env='TEST_DATABASE_URL', default="sqlite:///%s/db.sqlite3" % BASE_DIR) @@ -15,27 +22,49 @@ DATABASES['default']['ENGINE'] = "django.contrib.gis.db.backends.spatialite" SPATIALITE_LIBRARY_PATH = os.environ.get('SPATIALITE_LIBRARY_PATH', 'mod_spatialite') - -MONGO_CONNECTION_URL = 'mongodb://fakehost/formhub_test' -MONGO_CONNECTION = MockMongoClient( - MONGO_CONNECTION_URL, j=True, tz_aware=True) -MONGO_DB = MONGO_CONNECTION['formhub_test'] - -TESTING_MODE = True - MEDIA_ROOT = '/tmp/test_media/' -CELERY_TASK_ALWAYS_EAGER = True -BROKER_BACKEND = 'memory' -ENKETO_API_TOKEN = 'abc' # DISABLE Django DB logging LOGGING['loggers']['django.db.backends'] = { - 'level': 'WARNING', - 'propagate': True - } + 'level': 'WARNING', + 'propagate': True +} + +SECRET_KEY = os.urandom(50).hex() + +################################### +# Django Rest Framework settings # +################################### -GUARDIAN_GET_INIT_ANONYMOUS_USER = 'onadata.apps.main.models.user_profile.get_anonymous_user_instance' -# fake endpoints for testing +################################ +# KoBoCAT settings # +################################ + +TESTING_MODE = True TEST_HTTP_HOST = 'testserver.com' TEST_USERNAME = 'bob' +# Needed to get ANONYMOUS_USER = -1 in `testing` +GUARDIAN_GET_INIT_ANONYMOUS_USER = 'onadata.apps.main.models.user_profile.get_anonymous_user_instance' + +################################ +# Celery settings # +################################ + +CELERY_TASK_ALWAYS_EAGER = True +CELERY_BROKER_TRANSPORT = 'memory' + +################################ +# Enketo Express settings # +################################ + +ENKETO_API_TOKEN = os.urandom(50).hex() + +################################ +# MongoDB settings # +################################ + +MONGO_CONNECTION_URL = 'mongodb://fakehost/formhub_test' +MONGO_CONNECTION = MockMongoClient( + MONGO_CONNECTION_URL, j=True, tz_aware=True) +MONGO_DB = MONGO_CONNECTION['formhub_test'] From 5c3aaf14ab35f308227ff1ba573420f865010924 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Wed, 19 Aug 2020 13:18:37 -0400 Subject: [PATCH 07/18] Removed not used ExceptionLoggingMiddleware --- onadata/libs/utils/middleware.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/onadata/libs/utils/middleware.py b/onadata/libs/utils/middleware.py index 24b97368a..0d36c43aa 100644 --- a/onadata/libs/utils/middleware.py +++ b/onadata/libs/utils/middleware.py @@ -1,21 +1,13 @@ # coding: utf-8 -import traceback from django.db import connection from django.http import HttpResponseNotAllowed -from django.template import RequestContext from django.template import loader from django.middleware.locale import LocaleMiddleware from django.utils.deprecation import MiddlewareMixin from django.utils.translation.trans_real import parse_accept_lang_header -class ExceptionLoggingMiddleware(MiddlewareMixin): - - def process_exception(self, request, exception): - print(traceback.format_exc()) - - class HTTPResponseNotAllowedMiddleware(MiddlewareMixin): def process_response(self, request, response): From 5a74dffce9cdf3b94857ec94a130510329855c10 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Wed, 19 Aug 2020 13:21:13 -0400 Subject: [PATCH 08/18] Removed installation of raven package on dev mode --- docker/run_uwsgi.bash | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docker/run_uwsgi.bash b/docker/run_uwsgi.bash index 2f84c4592..89df4dedd 100755 --- a/docker/run_uwsgi.bash +++ b/docker/run_uwsgi.bash @@ -44,11 +44,6 @@ else sv start "${SERVICES_DIR}/celery_beat" fi - if [[ -n "$RAVEN_DSN" ]]; then - echo "Sentry detected. Installing \`raven\` pip dependency..." - pip install raven - fi - echo "Running KoBoCAT container with \`runserver_plus\` debugging application server." UWSGI_COMMAND="python manage.py runserver_plus 0:8001" fi From 2dad4344ae3a5b61cc686a563725b739e38e8418 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Thu, 20 Aug 2020 09:25:41 -0400 Subject: [PATCH 09/18] Removed South migrations --- manage.py | 5 +- .../apps/api/south_migrations/0001_initial.py | 106 ----------- ...t__add_unique_project_name_organization.py | 121 ------------- ...__add_unique_projectxform_xform_project.py | 138 -------------- ...__add_field_team_date_created__add_fiel.py | 163 ----------------- .../0005_auto__add_field_project_metadata.py | 147 --------------- .../0006_auto__add_field_project_shared.py | 148 --------------- .../0007_auto__chg_field_project_metadata.py | 146 --------------- ...008_auto_add_user_star_field_to_project.py | 154 ---------------- onadata/apps/api/south_migrations/__init__.py | 1 - onadata/apps/logger/management/__init__.py | 19 -- .../logger/south_migrations/0001_initial.py | 145 --------------- ...string__add_unique_xform_id_string_user.py | 102 ----------- .../0003_auto__add_field_xform_deleted.py | 97 ---------- .../0004_auto__del_field_xform_deleted.py | 95 ---------- ...field_xform_json__add_field_xform_share.py | 111 ------------ .../0006_copy_data_dictionary_info.py | 95 ---------- ...07_auto__add_field_xform_has_start_time.py | 98 ---------- .../south_migrations/0008_add_description.py | 101 ----------- .../0009_auto__add_field_xform_shared_data.py | 100 ----------- .../0010_auto__add_field_xform_uuid.py | 103 ----------- .../logger/south_migrations/0011_add_uuid.py | 103 ----------- .../0012_add_permission_view_xform.py | 112 ------------ .../0013_auto__add_field_instance_uuid.py | 105 ----------- .../0014_add_instance_uuids.py | 104 ----------- ...015_auto__add_field_xform_is_crowd_form.py | 105 ----------- ...16_auto__add_field_xform_bamboo_dataset.py | 106 ----------- ...017_auto__add_field_instance_deleted_at.py | 107 ----------- .../0018_auto__add_instancehistory.py | 122 ------------- .../0019_auto__chg_field_instance_uuid.py | 115 ------------ .../0020_auto__chg_field_instance_uuid.py | 115 ------------ ...21_auto__add_field_instancehistory_uuid.py | 116 ------------ ...022_auto__add_field_attachment_mimetype.py | 117 ------------ .../0023_auto__add_unique_surveytype_slug.py | 117 ------------ ...lows_sms__add_field_xform_sms_id_string.py | 128 ------------- ...024_auto__chg_field_attachment_mimetype.py | 116 ------------ .../0025_auto__add_field_xform_encrypted.py | 119 ------------ .../0025_sms_id_string_filling.py | 116 ------------ ...ring__add_unique_xform_sms_id_string_us.py | 124 ------------- .../0027_added_instance_is_deleted.py | 125 ------------- .../0028_update_is_deleted_field.py | 118 ------------ ...type__add_field_xform_encrypted__add_fi.py | 144 --------------- ...uto__add_field_xform_num_of_submissions.py | 137 -------------- .../0030_auto__add_ziggyinstance.py | 145 --------------- ...o__add_field_xform_last_submission_time.py | 138 -------------- ...o__add_field_ziggyinstance_form_version.py | 136 -------------- .../0032_added_xform_to_ziggy_submissions.py | 137 -------------- .../south_migrations/0032_index_uuid.py | 14 -- .../south_migrations/0033_add_model_Note.py | 166 ----------------- .../0033_auto__chg_field_xform_id_string.py | 136 -------------- .../0034_add_field_Instance_json.py | 162 ----------------- .../logger/south_migrations/0035_fill_json.py | 169 ------------------ ...036_auto__chg_field_xform_sms_id_string.py | 160 ----------------- ...nce_start_time__del_field_instance_date.py | 168 ----------------- ...038_auto__del_field_instance_is_deleted.py | 159 ---------------- ...ith_geopoints__add_field_xform_instance.py | 168 ----------------- .../0040_auto__add_field_instance_geom.py | 161 ----------------- .../0041_convert_lng_lat_to_points.py | 158 ---------------- .../0042_remove_odk_prefix.py | 168 ----------------- .../south_migrations/0043_xform_title_255.py | 158 ---------------- ...044_auto__del_field_xform_is_crowd_form.py | 146 --------------- ...0045_auto__add_field_xform_require_auth.py | 160 ----------------- .../apps/logger/south_migrations/__init__.py | 1 - .../management/commands/remove_odk_prefix.py | 17 -- .../main/south_migrations/0001_initial.py | 22 --- .../0002_auto__add_userprofile.py | 82 --------- ...auto__add_field_userprofile_description.py | 73 -------- .../0004_auto__add_metadata.py | 103 ----------- ...0005_auto__add_field_metadata_data_file.py | 98 ---------- ...uto__add_field_userprofile_require_auth.py | 99 ---------- ...auto__add_field_metadata_data_file_type.py | 100 ----------- ...ecial_chars_and_whitespace_in_usernames.py | 104 ----------- .../0008_auto__add_tokenstoragemodel.py | 110 ------------ ...ress__add_field_userprofile_phonenumber.py | 122 ------------- ..._auto__add_field_userprofile_created_by.py | 114 ------------ ...dd_field_userprofile_num_of_submissions.py | 132 -------------- ...que_metadata_xform_data_type_data_value.py | 139 -------------- ...0013_auto__add_field_metadata_file_hash.py | 133 -------------- ...14_added_metadata_field_to_user_profile.py | 121 ------------- .../apps/main/south_migrations/__init__.py | 1 - .../south_migrations/0001_initial.py | 92 ---------- ...ique_restservice_service_url_name_xform.py | 86 --------- .../restservice/south_migrations/__init__.py | 1 - .../viewer/south_migrations/0001_initial.py | 166 ----------------- ...0002_auto__add_field_datadictionary_xls.py | 122 ------------- ...003_auto__add_field_datadictionary_user.py | 123 ------------- ...4_auto__add_field_datadictionary_shared.py | 124 ------------- .../0005_auto__del_datadictionary.py | 126 ------------- .../south_migrations/0006_auto__add_export.py | 138 -------------- ...0007_auto__add_field_export_export_type.py | 133 -------------- .../0008_auto__chg_field_export_filename.py | 133 -------------- ...port_task_id__chg_field_export_filename.py | 140 --------------- .../0010_auto__add_field_export_filepath.py | 136 -------------- ...port_filepath__add_field_export_filedir.py | 142 --------------- ...dd_field_export_time_of_last_submission.py | 137 -------------- ..._auto__add_unique_export_filename_xform.py | 137 -------------- .../0014_auto__add_field_export__status.py | 139 -------------- ...tatus__add_field_export_internal_status.py | 147 --------------- .../0016_auto__add_field_export_export_url.py | 140 --------------- .../0017_remove_odk_prefix.py | 163 ----------------- .../apps/viewer/south_migrations/__init__.py | 1 - onadata/libs/data/db.py | 13 -- .../libs/utils/nose_plugins/SilenceSouth.py | 12 -- onadata/libs/utils/nose_plugins/__init__.py | 2 - onadata/settings/base.py | 1 + 105 files changed, 2 insertions(+), 11698 deletions(-) delete mode 100644 onadata/apps/api/south_migrations/0001_initial.py delete mode 100644 onadata/apps/api/south_migrations/0002_auto__add_project__add_unique_project_name_organization.py delete mode 100644 onadata/apps/api/south_migrations/0003_auto__add_projectxform__add_unique_projectxform_xform_project.py delete mode 100644 onadata/apps/api/south_migrations/0004_auto__add_field_team_created_by__add_field_team_date_created__add_fiel.py delete mode 100644 onadata/apps/api/south_migrations/0005_auto__add_field_project_metadata.py delete mode 100644 onadata/apps/api/south_migrations/0006_auto__add_field_project_shared.py delete mode 100644 onadata/apps/api/south_migrations/0007_auto__chg_field_project_metadata.py delete mode 100644 onadata/apps/api/south_migrations/0008_auto_add_user_star_field_to_project.py delete mode 100644 onadata/apps/api/south_migrations/__init__.py delete mode 100644 onadata/apps/logger/south_migrations/0001_initial.py delete mode 100644 onadata/apps/logger/south_migrations/0002_auto__del_unique_xform_id_string__add_unique_xform_id_string_user.py delete mode 100644 onadata/apps/logger/south_migrations/0003_auto__add_field_xform_deleted.py delete mode 100644 onadata/apps/logger/south_migrations/0004_auto__del_field_xform_deleted.py delete mode 100644 onadata/apps/logger/south_migrations/0005_auto__add_field_xform_xls__add_field_xform_json__add_field_xform_share.py delete mode 100644 onadata/apps/logger/south_migrations/0006_copy_data_dictionary_info.py delete mode 100644 onadata/apps/logger/south_migrations/0007_auto__add_field_xform_has_start_time.py delete mode 100644 onadata/apps/logger/south_migrations/0008_add_description.py delete mode 100644 onadata/apps/logger/south_migrations/0009_auto__add_field_xform_shared_data.py delete mode 100644 onadata/apps/logger/south_migrations/0010_auto__add_field_xform_uuid.py delete mode 100644 onadata/apps/logger/south_migrations/0011_add_uuid.py delete mode 100644 onadata/apps/logger/south_migrations/0012_add_permission_view_xform.py delete mode 100644 onadata/apps/logger/south_migrations/0013_auto__add_field_instance_uuid.py delete mode 100644 onadata/apps/logger/south_migrations/0014_add_instance_uuids.py delete mode 100644 onadata/apps/logger/south_migrations/0015_auto__add_field_xform_is_crowd_form.py delete mode 100644 onadata/apps/logger/south_migrations/0016_auto__add_field_xform_bamboo_dataset.py delete mode 100644 onadata/apps/logger/south_migrations/0017_auto__add_field_instance_deleted_at.py delete mode 100644 onadata/apps/logger/south_migrations/0018_auto__add_instancehistory.py delete mode 100644 onadata/apps/logger/south_migrations/0019_auto__chg_field_instance_uuid.py delete mode 100644 onadata/apps/logger/south_migrations/0020_auto__chg_field_instance_uuid.py delete mode 100644 onadata/apps/logger/south_migrations/0021_auto__add_field_instancehistory_uuid.py delete mode 100644 onadata/apps/logger/south_migrations/0022_auto__add_field_attachment_mimetype.py delete mode 100644 onadata/apps/logger/south_migrations/0023_auto__add_unique_surveytype_slug.py delete mode 100644 onadata/apps/logger/south_migrations/0024_auto__add_field_xform_allows_sms__add_field_xform_sms_id_string.py delete mode 100644 onadata/apps/logger/south_migrations/0024_auto__chg_field_attachment_mimetype.py delete mode 100644 onadata/apps/logger/south_migrations/0025_auto__add_field_xform_encrypted.py delete mode 100644 onadata/apps/logger/south_migrations/0025_sms_id_string_filling.py delete mode 100644 onadata/apps/logger/south_migrations/0026_auto__chg_field_xform_sms_id_string__add_unique_xform_sms_id_string_us.py delete mode 100644 onadata/apps/logger/south_migrations/0027_added_instance_is_deleted.py delete mode 100644 onadata/apps/logger/south_migrations/0028_update_is_deleted_field.py delete mode 100644 onadata/apps/logger/south_migrations/0029_auto__chg_field_attachment_mimetype__add_field_xform_encrypted__add_fi.py delete mode 100644 onadata/apps/logger/south_migrations/0030_auto__add_field_xform_num_of_submissions.py delete mode 100644 onadata/apps/logger/south_migrations/0030_auto__add_ziggyinstance.py delete mode 100644 onadata/apps/logger/south_migrations/0031_auto__add_field_xform_last_submission_time.py delete mode 100644 onadata/apps/logger/south_migrations/0031_auto__add_field_ziggyinstance_form_version.py delete mode 100644 onadata/apps/logger/south_migrations/0032_added_xform_to_ziggy_submissions.py delete mode 100644 onadata/apps/logger/south_migrations/0032_index_uuid.py delete mode 100644 onadata/apps/logger/south_migrations/0033_add_model_Note.py delete mode 100644 onadata/apps/logger/south_migrations/0033_auto__chg_field_xform_id_string.py delete mode 100644 onadata/apps/logger/south_migrations/0034_add_field_Instance_json.py delete mode 100644 onadata/apps/logger/south_migrations/0035_fill_json.py delete mode 100644 onadata/apps/logger/south_migrations/0036_auto__chg_field_xform_sms_id_string.py delete mode 100644 onadata/apps/logger/south_migrations/0037_auto__del_field_instance_start_time__del_field_instance_date.py delete mode 100644 onadata/apps/logger/south_migrations/0038_auto__del_field_instance_is_deleted.py delete mode 100644 onadata/apps/logger/south_migrations/0039_auto__del_field_xform_surveys_with_geopoints__add_field_xform_instance.py delete mode 100644 onadata/apps/logger/south_migrations/0040_auto__add_field_instance_geom.py delete mode 100644 onadata/apps/logger/south_migrations/0041_convert_lng_lat_to_points.py delete mode 100644 onadata/apps/logger/south_migrations/0042_remove_odk_prefix.py delete mode 100644 onadata/apps/logger/south_migrations/0043_xform_title_255.py delete mode 100644 onadata/apps/logger/south_migrations/0044_auto__del_field_xform_is_crowd_form.py delete mode 100644 onadata/apps/logger/south_migrations/0045_auto__add_field_xform_require_auth.py delete mode 100644 onadata/apps/logger/south_migrations/__init__.py delete mode 100644 onadata/apps/main/management/commands/remove_odk_prefix.py delete mode 100644 onadata/apps/main/south_migrations/0001_initial.py delete mode 100644 onadata/apps/main/south_migrations/0002_auto__add_userprofile.py delete mode 100644 onadata/apps/main/south_migrations/0003_auto__add_field_userprofile_description.py delete mode 100644 onadata/apps/main/south_migrations/0004_auto__add_metadata.py delete mode 100644 onadata/apps/main/south_migrations/0005_auto__add_field_metadata_data_file.py delete mode 100644 onadata/apps/main/south_migrations/0006_auto__add_field_userprofile_require_auth.py delete mode 100644 onadata/apps/main/south_migrations/0007_auto__add_field_metadata_data_file_type.py delete mode 100644 onadata/apps/main/south_migrations/0007_replace_special_chars_and_whitespace_in_usernames.py delete mode 100644 onadata/apps/main/south_migrations/0008_auto__add_tokenstoragemodel.py delete mode 100644 onadata/apps/main/south_migrations/0009_auto__add_field_userprofile_address__add_field_userprofile_phonenumber.py delete mode 100644 onadata/apps/main/south_migrations/0010_auto__add_field_userprofile_created_by.py delete mode 100644 onadata/apps/main/south_migrations/0011_auto__add_field_userprofile_num_of_submissions.py delete mode 100644 onadata/apps/main/south_migrations/0012_auto__add_unique_metadata_xform_data_type_data_value.py delete mode 100644 onadata/apps/main/south_migrations/0013_auto__add_field_metadata_file_hash.py delete mode 100644 onadata/apps/main/south_migrations/0014_added_metadata_field_to_user_profile.py delete mode 100644 onadata/apps/main/south_migrations/__init__.py delete mode 100644 onadata/apps/restservice/south_migrations/0001_initial.py delete mode 100644 onadata/apps/restservice/south_migrations/0002_auto__add_unique_restservice_service_url_name_xform.py delete mode 100644 onadata/apps/restservice/south_migrations/__init__.py delete mode 100644 onadata/apps/viewer/south_migrations/0001_initial.py delete mode 100644 onadata/apps/viewer/south_migrations/0002_auto__add_field_datadictionary_xls.py delete mode 100644 onadata/apps/viewer/south_migrations/0003_auto__add_field_datadictionary_user.py delete mode 100644 onadata/apps/viewer/south_migrations/0004_auto__add_field_datadictionary_shared.py delete mode 100644 onadata/apps/viewer/south_migrations/0005_auto__del_datadictionary.py delete mode 100644 onadata/apps/viewer/south_migrations/0006_auto__add_export.py delete mode 100644 onadata/apps/viewer/south_migrations/0007_auto__add_field_export_export_type.py delete mode 100644 onadata/apps/viewer/south_migrations/0008_auto__chg_field_export_filename.py delete mode 100644 onadata/apps/viewer/south_migrations/0009_auto__add_field_export_task_id__chg_field_export_filename.py delete mode 100644 onadata/apps/viewer/south_migrations/0010_auto__add_field_export_filepath.py delete mode 100644 onadata/apps/viewer/south_migrations/0011_auto__del_field_export_filepath__add_field_export_filedir.py delete mode 100644 onadata/apps/viewer/south_migrations/0012_auto__add_field_export_time_of_last_submission.py delete mode 100644 onadata/apps/viewer/south_migrations/0013_auto__add_unique_export_filename_xform.py delete mode 100644 onadata/apps/viewer/south_migrations/0014_auto__add_field_export__status.py delete mode 100644 onadata/apps/viewer/south_migrations/0015_auto__del_field_export__status__add_field_export_internal_status.py delete mode 100644 onadata/apps/viewer/south_migrations/0016_auto__add_field_export_export_url.py delete mode 100644 onadata/apps/viewer/south_migrations/0017_remove_odk_prefix.py delete mode 100644 onadata/apps/viewer/south_migrations/__init__.py delete mode 100644 onadata/libs/utils/nose_plugins/SilenceSouth.py delete mode 100644 onadata/libs/utils/nose_plugins/__init__.py diff --git a/manage.py b/manage.py index 0041d0d83..72a08ffb5 100755 --- a/manage.py +++ b/manage.py @@ -4,14 +4,11 @@ import os import sys -south_logger = logging.getLogger('south') -south_logger.setLevel(logging.INFO) - if __name__ == "__main__": # altered for new settings layout if not any([arg.startswith('--settings=') for arg in sys.argv]): os.environ.setdefault("DJANGO_SETTINGS_MODULE", - "onadata.settings.common") + "onadata.settings.base") print('Your environment is:"{}"'.format( os.environ['DJANGO_SETTINGS_MODULE'])) diff --git a/onadata/apps/api/south_migrations/0001_initial.py b/onadata/apps/api/south_migrations/0001_initial.py deleted file mode 100644 index bfdaeaba1..000000000 --- a/onadata/apps/api/south_migrations/0001_initial.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'OrganizationProfile' - db.create_table('api_organizationprofile', ( - ('userprofile_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['main.UserProfile'], unique=True, primary_key=True)), - ('is_organization', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('creator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - )) - db.send_create_signal('api', ['OrganizationProfile']) - - # Adding model 'Team' - db.create_table('api_team', ( - ('group_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.Group'], unique=True, primary_key=True)), - ('organization', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - )) - db.send_create_signal('api', ['Team']) - - - - def backwards(self, orm): - # Deleting model 'OrganizationProfile' - db.delete_table('api_organizationprofile') - - # Deleting model 'Team' - db.delete_table('api_team') - - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['models.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'models.project': { - 'Meta': {'object_name': 'Project'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/0002_auto__add_project__add_unique_project_name_organization.py b/onadata/apps/api/south_migrations/0002_auto__add_project__add_unique_project_name_organization.py deleted file mode 100644 index 65571a19b..000000000 --- a/onadata/apps/api/south_migrations/0002_auto__add_project__add_unique_project_name_organization.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Project' - db.create_table('api_project', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('organization', self.gf('django.db.models.fields.related.ForeignKey')(related_name='project_organization', to=orm['auth.User'])), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='project_creator', to=orm['auth.User'])), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('api', ['Project']) - - # Adding unique constraint on 'Project', fields ['name', 'organization'] - db.create_unique('api_project', ['name', 'organization_id']) - - # Adding M2M table for field projects on 'Team' - db.create_table('api_team_projects', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('team', models.ForeignKey(orm['api.team'], null=False)), - ('project', models.ForeignKey(orm['api.project'], null=False)) - )) - db.create_unique('api_team_projects', ['team_id', 'project_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'Project', fields ['name', 'organization'] - db.delete_unique('api_project', ['name', 'organization_id']) - - # Deleting model 'Project' - db.delete_table('api_project') - - # Removing M2M table for field projects on 'Team' - db.delete_table('api_team_projects') - - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.project': { - 'Meta': {'unique_together': "(('name', 'organization'),)", 'object_name': 'Project'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_creator'", 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_organization'", 'to': "orm['auth.User']"}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/0003_auto__add_projectxform__add_unique_projectxform_xform_project.py b/onadata/apps/api/south_migrations/0003_auto__add_projectxform__add_unique_projectxform_xform_project.py deleted file mode 100644 index f4bddad70..000000000 --- a/onadata/apps/api/south_migrations/0003_auto__add_projectxform__add_unique_projectxform_xform_project.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'ProjectXForm' - db.create_table('api_projectxform', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xform', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['logger.XForm'])), - ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Project'])), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - )) - db.send_create_signal('api', ['ProjectXForm']) - - # Adding unique constraint on 'ProjectXForm', fields ['xform', 'project'] - db.create_unique('api_projectxform', ['xform_id', 'project_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'ProjectXForm', fields ['xform', 'project'] - db.delete_unique('api_projectxform', ['xform_id', 'project_id']) - - # Deleting model 'ProjectXForm' - db.delete_table('api_projectxform') - - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.project': { - 'Meta': {'unique_together': "(('name', 'organization'),)", 'object_name': 'Project'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_creator'", 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_organization'", 'to': "orm['auth.User']"}) - }, - 'api.projectxform': { - 'Meta': {'unique_together': "(('xform', 'project'),)", 'object_name': 'ProjectXForm'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Project']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/0004_auto__add_field_team_created_by__add_field_team_date_created__add_fiel.py b/onadata/apps/api/south_migrations/0004_auto__add_field_team_created_by__add_field_team_date_created__add_fiel.py deleted file mode 100644 index 59d922465..000000000 --- a/onadata/apps/api/south_migrations/0004_auto__add_field_team_created_by__add_field_team_date_created__add_fiel.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 -import datetime - -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Team.created_by' - db.add_column('api_team', 'created_by', - self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='team_creator', null=True, to=orm['auth.User']), - keep_default=False) - - # Adding field 'Team.date_created' - db.add_column('api_team', 'date_created', - self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True), - keep_default=False) - - # Adding field 'Team.date_modified' - db.add_column('api_team', 'date_modified', - self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Team.created_by' - db.delete_column('api_team', 'created_by_id') - - # Deleting field 'Team.date_created' - db.delete_column('api_team', 'date_created') - - # Deleting field 'Team.date_modified' - db.delete_column('api_team', 'date_modified') - - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.project': { - 'Meta': {'unique_together': "(('name', 'organization'),)", 'object_name': 'Project'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_creator'", 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_organization'", 'to': "orm['auth.User']"}) - }, - 'api.projectxform': { - 'Meta': {'unique_together': "(('xform', 'project'),)", 'object_name': 'ProjectXForm'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Project']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'team_creator'", 'null': 'True', 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/0005_auto__add_field_project_metadata.py b/onadata/apps/api/south_migrations/0005_auto__add_field_project_metadata.py deleted file mode 100644 index 43ab4340b..000000000 --- a/onadata/apps/api/south_migrations/0005_auto__add_field_project_metadata.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Project.metadata' - db.add_column('api_project', 'metadata', - self.gf('jsonfield.fields.JSONField')(null=True), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'Project.metadata' - db.delete_column('api_project', 'metadata') - - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.project': { - 'Meta': {'unique_together': "(('name', 'organization'),)", 'object_name': 'Project'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_creator'", 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata': ('jsonfield.fields.JSONField', [], {'null': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_organization'", 'to': "orm['auth.User']"}) - }, - 'api.projectxform': { - 'Meta': {'unique_together': "(('xform', 'project'),)", 'object_name': 'ProjectXForm'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Project']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'team_creator'", 'null': 'True', 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/0006_auto__add_field_project_shared.py b/onadata/apps/api/south_migrations/0006_auto__add_field_project_shared.py deleted file mode 100644 index 0f907878a..000000000 --- a/onadata/apps/api/south_migrations/0006_auto__add_field_project_shared.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Project.shared' - db.add_column('api_project', 'shared', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Project.shared' - db.delete_column('api_project', 'shared') - - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.project': { - 'Meta': {'unique_together': "(('name', 'organization'),)", 'object_name': 'Project'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_creator'", 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata': ('jsonfield.fields.JSONField', [], {'default': '{}', 'null': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_organization'", 'to': "orm['auth.User']"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'api.projectxform': { - 'Meta': {'unique_together': "(('xform', 'project'),)", 'object_name': 'ProjectXForm'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Project']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'team_creator'", 'null': 'True', 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/0007_auto__chg_field_project_metadata.py b/onadata/apps/api/south_migrations/0007_auto__chg_field_project_metadata.py deleted file mode 100644 index f97404a50..000000000 --- a/onadata/apps/api/south_migrations/0007_auto__chg_field_project_metadata.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Project.metadata' - db.alter_column('api_project', 'metadata', self.gf('jsonfield.fields.JSONField')(default={'category': 'none'})) - - def backwards(self, orm): - - # Changing field 'Project.metadata' - db.alter_column('api_project', 'metadata', self.gf('jsonfield.fields.JSONField')(null=True)) - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.project': { - 'Meta': {'unique_together': "(('name', 'organization'),)", 'object_name': 'Project'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_creator'", 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_organization'", 'to': "orm['auth.User']"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'api.projectxform': { - 'Meta': {'unique_together': "(('xform', 'project'),)", 'object_name': 'ProjectXForm'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Project']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'team_creator'", 'null': 'True', 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/0008_auto_add_user_star_field_to_project.py b/onadata/apps/api/south_migrations/0008_auto_add_user_star_field_to_project.py deleted file mode 100644 index cdc56e382..000000000 --- a/onadata/apps/api/south_migrations/0008_auto_add_user_star_field_to_project.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding M2M table for field user_stars on 'Project' - m2m_table_name = db.shorten_name('api_project_user_stars') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('project', models.ForeignKey(orm['api.project'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique(m2m_table_name, ['project_id', 'user_id']) - - - def backwards(self, orm): - # Removing M2M table for field user_stars on 'Project' - db.delete_table(db.shorten_name('api_project_user_stars')) - - - models = { - 'api.organizationprofile': { - 'Meta': {'object_name': 'OrganizationProfile', '_ormbases': ['main.UserProfile']}, - 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'is_organization': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'userprofile_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['main.UserProfile']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'api.project': { - 'Meta': {'unique_together': "(('name', 'organization'),)", 'object_name': 'Project'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_creator'", 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata': ('jsonfield.fields.JSONField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'project_organization'", 'to': "orm['auth.User']"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'user_stars': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}) - }, - 'api.projectxform': { - 'Meta': {'unique_together': "(('xform', 'project'),)", 'object_name': 'ProjectXForm'}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Project']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'api.team': { - 'Meta': {'object_name': 'Team', '_ormbases': ['auth.Group']}, - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'team_creator'", 'null': 'True', 'to': "orm['auth.User']"}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.Project']", 'symmetrical': 'False'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['api'] diff --git a/onadata/apps/api/south_migrations/__init__.py b/onadata/apps/api/south_migrations/__init__.py deleted file mode 100644 index 57d631c3f..000000000 --- a/onadata/apps/api/south_migrations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding: utf-8 diff --git a/onadata/apps/logger/management/__init__.py b/onadata/apps/logger/management/__init__.py index 105831048..57d631c3f 100644 --- a/onadata/apps/logger/management/__init__.py +++ b/onadata/apps/logger/management/__init__.py @@ -1,20 +1 @@ # coding: utf-8 -''' -from south.signals import post_migrate -from django.conf import settings -from django.db.models import get_app, get_models -from django.contrib.auth.management import create_permissions - - -# Courtesy of http://devwithpassion.com/felipe/south-django-permissions/ -def update_permissions_after_migration(app, **kwargs): - """ - Update app permission just after every migration. - """ - - create_permissions( - get_app(app), get_models(), 2 if settings.DEBUG else 0) - - -post_migrate.connect(update_permissions_after_migration) -''' diff --git a/onadata/apps/logger/south_migrations/0001_initial.py b/onadata/apps/logger/south_migrations/0001_initial.py deleted file mode 100644 index d2a30ad8b..000000000 --- a/onadata/apps/logger/south_migrations/0001_initial.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'XForm' - db.create_table('odk_logger_xform', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xml', self.gf('django.db.models.fields.TextField')()), - ('downloadable', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='xforms', null=True, to=orm['auth.User'])), - ('id_string', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('odk_logger', ['XForm']) - - # Adding model 'SurveyType' - db.create_table('odk_logger_surveytype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('slug', self.gf('django.db.models.fields.CharField')(max_length=100)), - )) - db.send_create_signal('odk_logger', ['SurveyType']) - - # Adding model 'Instance' - db.create_table('odk_logger_instance', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xml', self.gf('django.db.models.fields.TextField')()), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='surveys', null=True, to=orm['auth.User'])), - ('xform', self.gf('django.db.models.fields.related.ForeignKey')(related_name='surveys', null=True, to=orm['odk_logger.XForm'])), - ('start_time', self.gf('django.db.models.fields.DateTimeField')(null=True)), - ('date', self.gf('django.db.models.fields.DateField')(null=True)), - ('survey_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['odk_logger.SurveyType'])), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - ('status', self.gf('django.db.models.fields.CharField')(default='submitted_via_web', max_length=20)), - )) - db.send_create_signal('odk_logger', ['Instance']) - - # Adding model 'Attachment' - db.create_table('odk_logger_attachment', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='attachments', to=orm['odk_logger.Instance'])), - ('media_file', self.gf('django.db.models.fields.files.FileField')(max_length=100)), - )) - db.send_create_signal('odk_logger', ['Attachment']) - - - def backwards(self, orm): - - # Deleting model 'XForm' - db.delete_table('odk_logger_xform') - - # Deleting model 'SurveyType' - db.delete_table('odk_logger_surveytype') - - # Deleting model 'Instance' - db.delete_table('odk_logger_instance') - - # Deleting model 'Attachment' - db.delete_table('odk_logger_attachment') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0002_auto__del_unique_xform_id_string__add_unique_xform_id_string_user.py b/onadata/apps/logger/south_migrations/0002_auto__del_unique_xform_id_string__add_unique_xform_id_string_user.py deleted file mode 100644 index 7141943f3..000000000 --- a/onadata/apps/logger/south_migrations/0002_auto__del_unique_xform_id_string__add_unique_xform_id_string_user.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Removing unique constraint on 'XForm', fields ['id_string'] - db.delete_unique('odk_logger_xform', ['id_string']) - - # Adding unique constraint on 'XForm', fields ['id_string', 'user'] - db.create_unique('odk_logger_xform', ['id_string', 'user_id']) - - - def backwards(self, orm): - - # Removing unique constraint on 'XForm', fields ['id_string', 'user'] - db.delete_unique('odk_logger_xform', ['id_string', 'user_id']) - - # Adding unique constraint on 'XForm', fields ['id_string'] - db.create_unique('odk_logger_xform', ['id_string']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0003_auto__add_field_xform_deleted.py b/onadata/apps/logger/south_migrations/0003_auto__add_field_xform_deleted.py deleted file mode 100644 index 78732cf6a..000000000 --- a/onadata/apps/logger/south_migrations/0003_auto__add_field_xform_deleted.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'XForm.deleted' - db.add_column('odk_logger_xform', 'deleted', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'XForm.deleted' - db.delete_column('odk_logger_xform', 'deleted') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0004_auto__del_field_xform_deleted.py b/onadata/apps/logger/south_migrations/0004_auto__del_field_xform_deleted.py deleted file mode 100644 index 5bffee237..000000000 --- a/onadata/apps/logger/south_migrations/0004_auto__del_field_xform_deleted.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Deleting field 'XForm.deleted' - db.delete_column('odk_logger_xform', 'deleted') - - - def backwards(self, orm): - - # Adding field 'XForm.deleted' - db.add_column('odk_logger_xform', 'deleted', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0005_auto__add_field_xform_xls__add_field_xform_json__add_field_xform_share.py b/onadata/apps/logger/south_migrations/0005_auto__add_field_xform_xls__add_field_xform_json__add_field_xform_share.py deleted file mode 100644 index 29a3d68cc..000000000 --- a/onadata/apps/logger/south_migrations/0005_auto__add_field_xform_xls__add_field_xform_json__add_field_xform_share.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'XForm.xls' - db.add_column('odk_logger_xform', 'xls', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True), keep_default=False) - - # Adding field 'XForm.json' - db.add_column('odk_logger_xform', 'json', self.gf('django.db.models.fields.TextField')(default=''), keep_default=False) - - # Adding field 'XForm.shared' - db.add_column('odk_logger_xform', 'shared', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'XForm.xls' - db.delete_column('odk_logger_xform', 'xls') - - # Deleting field 'XForm.json' - db.delete_column('odk_logger_xform', 'json') - - # Deleting field 'XForm.shared' - db.delete_column('odk_logger_xform', 'shared') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0006_copy_data_dictionary_info.py b/onadata/apps/logger/south_migrations/0006_copy_data_dictionary_info.py deleted file mode 100644 index 0776505ee..000000000 --- a/onadata/apps/logger/south_migrations/0006_copy_data_dictionary_info.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - "Write your forwards methods here." - pass - - def backwards(self, orm): - "Write your backwards methods here." - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0007_auto__add_field_xform_has_start_time.py b/onadata/apps/logger/south_migrations/0007_auto__add_field_xform_has_start_time.py deleted file mode 100644 index 383da2ba8..000000000 --- a/onadata/apps/logger/south_migrations/0007_auto__add_field_xform_has_start_time.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'XForm.has_start_time' - db.add_column('odk_logger_xform', 'has_start_time', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - def backwards(self, orm): - - # Deleting field 'XForm.has_start_time' - db.delete_column('odk_logger_xform', 'has_start_time') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0008_add_description.py b/onadata/apps/logger/south_migrations/0008_add_description.py deleted file mode 100644 index d9b456376..000000000 --- a/onadata/apps/logger/south_migrations/0008_add_description.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'XForm.description' - db.add_column('odk_logger_xform', 'description', self.gf('django.db.models.fields.TextField')(default='', null=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'XForm.description' - db.delete_column('odk_logger_xform', 'description') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0009_auto__add_field_xform_shared_data.py b/onadata/apps/logger/south_migrations/0009_auto__add_field_xform_shared_data.py deleted file mode 100644 index 0fb2c7579..000000000 --- a/onadata/apps/logger/south_migrations/0009_auto__add_field_xform_shared_data.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'XForm.shared_data' - db.add_column('odk_logger_xform', 'shared_data', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'XForm.shared_data' - db.delete_column('odk_logger_xform', 'shared_data') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0010_auto__add_field_xform_uuid.py b/onadata/apps/logger/south_migrations/0010_auto__add_field_xform_uuid.py deleted file mode 100644 index ce9bb6a00..000000000 --- a/onadata/apps/logger/south_migrations/0010_auto__add_field_xform_uuid.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'XForm.uuid' - db.add_column('odk_logger_xform', 'uuid', self.gf('django.db.models.fields.CharField')(default='', max_length=32), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'XForm.uuid' - db.delete_column('odk_logger_xform', 'uuid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0011_add_uuid.py b/onadata/apps/logger/south_migrations/0011_add_uuid.py deleted file mode 100644 index 1c3203920..000000000 --- a/onadata/apps/logger/south_migrations/0011_add_uuid.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -import uuid - -class Migration(DataMigration): - - def forwards(self, orm): - "Write your forwards methods here." - for xform in orm['odk_logger.XForm'].objects.all(): - xform.uuid = uuid.uuid4().hex - xform.save() - - - def backwards(self, orm): - "Write your backwards methods here." - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0012_add_permission_view_xform.py b/onadata/apps/logger/south_migrations/0012_add_permission_view_xform.py deleted file mode 100644 index 5cb79542f..000000000 --- a/onadata/apps/logger/south_migrations/0012_add_permission_view_xform.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -from django.contrib.contenttypes.models import ContentType -from django.contrib.auth.models import Permission - - -class Migration(DataMigration): - - depends_on = ( - ("guardian", "0005_auto__chg_field_groupobjectpermission_object_pk__chg_field_userobjectp"), - ) - - def forwards(self, orm): - pass - # remove old permission label if migrated with old model metadata - try: - ct = ContentType.objects.get(model='xform', app_label='odk_logger') - Permission.objects.get(content_type=ct, codename='can_view').delete() - # add new permission label - perm, created = Permission.objects.get_or_create(content_type=ct, codename='view_xform', name='Can view associated data!') - except (ContentType.DoesNotExist, Permission.DoesNotExist): - pass - - def backwards(self, orm): - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0013_auto__add_field_instance_uuid.py b/onadata/apps/logger/south_migrations/0013_auto__add_field_instance_uuid.py deleted file mode 100644 index ce3dbc0c8..000000000 --- a/onadata/apps/logger/south_migrations/0013_auto__add_field_instance_uuid.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Instance.uuid' - db.add_column('odk_logger_instance', 'uuid', self.gf('django.db.models.fields.CharField')(default='', max_length=32), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Instance.uuid' - db.delete_column('odk_logger_instance', 'uuid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0014_add_instance_uuids.py b/onadata/apps/logger/south_migrations/0014_add_instance_uuids.py deleted file mode 100644 index fe8f0e8b7..000000000 --- a/onadata/apps/logger/south_migrations/0014_add_instance_uuids.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -import uuid -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - "Write your forwards methods here." - for instance in orm['odk_logger.Instance'].objects.all(): - instance.uuid = uuid.uuid4().hex - instance.save() - - - def backwards(self, orm): - "Write your backwards methods here." - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0015_auto__add_field_xform_is_crowd_form.py b/onadata/apps/logger/south_migrations/0015_auto__add_field_xform_is_crowd_form.py deleted file mode 100644 index 5cf6dc693..000000000 --- a/onadata/apps/logger/south_migrations/0015_auto__add_field_xform_is_crowd_form.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'XForm.is_crowd_form' - db.add_column('odk_logger_xform', 'is_crowd_form', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'XForm.is_crowd_form' - db.delete_column('odk_logger_xform', 'is_crowd_form') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0016_auto__add_field_xform_bamboo_dataset.py b/onadata/apps/logger/south_migrations/0016_auto__add_field_xform_bamboo_dataset.py deleted file mode 100644 index 6dab3ecef..000000000 --- a/onadata/apps/logger/south_migrations/0016_auto__add_field_xform_bamboo_dataset.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'XForm.bamboo_dataset' - db.add_column('odk_logger_xform', 'bamboo_dataset', self.gf('django.db.models.fields.CharField')(default='', max_length=60), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'XForm.bamboo_dataset' - db.delete_column('odk_logger_xform', 'bamboo_dataset') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0017_auto__add_field_instance_deleted_at.py b/onadata/apps/logger/south_migrations/0017_auto__add_field_instance_deleted_at.py deleted file mode 100644 index b7212dcd3..000000000 --- a/onadata/apps/logger/south_migrations/0017_auto__add_field_instance_deleted_at.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Instance.deleted_at' - db.add_column('odk_logger_instance', 'deleted_at', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Instance.deleted_at' - db.delete_column('odk_logger_instance', 'deleted_at') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0018_auto__add_instancehistory.py b/onadata/apps/logger/south_migrations/0018_auto__add_instancehistory.py deleted file mode 100644 index f22e5a0dc..000000000 --- a/onadata/apps/logger/south_migrations/0018_auto__add_instancehistory.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'InstanceHistory' - db.create_table('odk_logger_instancehistory', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xform_instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='submission_history', to=orm['odk_logger.Instance'])), - ('xml', self.gf('django.db.models.fields.TextField')()), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('odk_logger', ['InstanceHistory']) - - - def backwards(self, orm): - - # Deleting model 'InstanceHistory' - db.delete_table('odk_logger_instancehistory') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0019_auto__chg_field_instance_uuid.py b/onadata/apps/logger/south_migrations/0019_auto__chg_field_instance_uuid.py deleted file mode 100644 index 3cedb5885..000000000 --- a/onadata/apps/logger/south_migrations/0019_auto__chg_field_instance_uuid.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Instance.uuid' - db.alter_column('odk_logger_instance', 'uuid', self.gf('django.db.models.fields.CharField')(max_length=36)) - - - def backwards(self, orm): - - # Changing field 'Instance.uuid' - db.alter_column('odk_logger_instance', 'uuid', self.gf('django.db.models.fields.CharField')(max_length=32)) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '36'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0020_auto__chg_field_instance_uuid.py b/onadata/apps/logger/south_migrations/0020_auto__chg_field_instance_uuid.py deleted file mode 100644 index 40a14dc27..000000000 --- a/onadata/apps/logger/south_migrations/0020_auto__chg_field_instance_uuid.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Instance.uuid' - db.alter_column('odk_logger_instance', 'uuid', self.gf('django.db.models.fields.CharField')(max_length=249)) - - - def backwards(self, orm): - - # Changing field 'Instance.uuid' - db.alter_column('odk_logger_instance', 'uuid', self.gf('django.db.models.fields.CharField')(max_length=36)) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0021_auto__add_field_instancehistory_uuid.py b/onadata/apps/logger/south_migrations/0021_auto__add_field_instancehistory_uuid.py deleted file mode 100644 index 8b5a36a70..000000000 --- a/onadata/apps/logger/south_migrations/0021_auto__add_field_instancehistory_uuid.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'InstanceHistory.uuid' - db.add_column('odk_logger_instancehistory', 'uuid', self.gf('django.db.models.fields.CharField')(default='', max_length=249), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'InstanceHistory.uuid' - db.delete_column('odk_logger_instancehistory', 'uuid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0022_auto__add_field_attachment_mimetype.py b/onadata/apps/logger/south_migrations/0022_auto__add_field_attachment_mimetype.py deleted file mode 100644 index c2b0a5140..000000000 --- a/onadata/apps/logger/south_migrations/0022_auto__add_field_attachment_mimetype.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Attachment.mimetype' - db.add_column('odk_logger_attachment', 'mimetype', self.gf('django.db.models.fields.CharField')(default='', max_length=20, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Attachment.mimetype' - db.delete_column('odk_logger_attachment', 'mimetype') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0023_auto__add_unique_surveytype_slug.py b/onadata/apps/logger/south_migrations/0023_auto__add_unique_surveytype_slug.py deleted file mode 100644 index d38530de3..000000000 --- a/onadata/apps/logger/south_migrations/0023_auto__add_unique_surveytype_slug.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding unique constraint on 'SurveyType', fields ['slug'] - db.create_unique('odk_logger_surveytype', ['slug']) - - - def backwards(self, orm): - - # Removing unique constraint on 'SurveyType', fields ['slug'] - db.delete_unique('odk_logger_surveytype', ['slug']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0024_auto__add_field_xform_allows_sms__add_field_xform_sms_id_string.py b/onadata/apps/logger/south_migrations/0024_auto__add_field_xform_allows_sms__add_field_xform_sms_id_string.py deleted file mode 100644 index 0fc5d8903..000000000 --- a/onadata/apps/logger/south_migrations/0024_auto__add_field_xform_allows_sms__add_field_xform_sms_id_string.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'XForm.allows_sms' - db.add_column('odk_logger_xform', 'allows_sms', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'XForm.sms_id_string' - db.add_column('odk_logger_xform', 'sms_id_string', - self.gf('django.db.models.fields.SlugField')(max_length=50, null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'XForm.allows_sms' - db.delete_column('odk_logger_xform', 'allows_sms') - - # Deleting field 'XForm.sms_id_string' - db.delete_column('odk_logger_xform', 'sms_id_string') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0024_auto__chg_field_attachment_mimetype.py b/onadata/apps/logger/south_migrations/0024_auto__chg_field_attachment_mimetype.py deleted file mode 100644 index ea0467e2d..000000000 --- a/onadata/apps/logger/south_migrations/0024_auto__chg_field_attachment_mimetype.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Attachment.mimetype' - db.alter_column('odk_logger_attachment', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=50)) - - def backwards(self, orm): - - # Changing field 'Attachment.mimetype' - db.alter_column('odk_logger_attachment', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=20)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0025_auto__add_field_xform_encrypted.py b/onadata/apps/logger/south_migrations/0025_auto__add_field_xform_encrypted.py deleted file mode 100644 index 7def60a72..000000000 --- a/onadata/apps/logger/south_migrations/0025_auto__add_field_xform_encrypted.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'XForm.encrypted' - db.add_column('odk_logger_xform', 'encrypted', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'XForm.encrypted' - db.delete_column('odk_logger_xform', 'encrypted') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0025_sms_id_string_filling.py b/onadata/apps/logger/south_migrations/0025_sms_id_string_filling.py deleted file mode 100644 index 48716965e..000000000 --- a/onadata/apps/logger/south_migrations/0025_sms_id_string_filling.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - for xform in orm['odk_logger.XForm'].objects.all(): - xform.sms_id_string = xform.id_string - xform.save() - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] - symmetrical = True diff --git a/onadata/apps/logger/south_migrations/0026_auto__chg_field_xform_sms_id_string__add_unique_xform_sms_id_string_us.py b/onadata/apps/logger/south_migrations/0026_auto__chg_field_xform_sms_id_string__add_unique_xform_sms_id_string_us.py deleted file mode 100644 index 7b942c260..000000000 --- a/onadata/apps/logger/south_migrations/0026_auto__chg_field_xform_sms_id_string__add_unique_xform_sms_id_string_us.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'XForm.sms_id_string' - db.alter_column('odk_logger_xform', 'sms_id_string', self.gf('django.db.models.fields.SlugField')(max_length=50)) - # Adding unique constraint on 'XForm', fields ['sms_id_string', 'user'] - db.create_unique('odk_logger_xform', ['sms_id_string', 'user_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'XForm', fields ['sms_id_string', 'user'] - db.delete_unique('odk_logger_xform', ['sms_id_string', 'user_id']) - - - # Changing field 'XForm.sms_id_string' - db.alter_column('odk_logger_xform', 'sms_id_string', self.gf('django.db.models.fields.SlugField')(max_length=50, null=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0027_added_instance_is_deleted.py b/onadata/apps/logger/south_migrations/0027_added_instance_is_deleted.py deleted file mode 100644 index 6e1759122..000000000 --- a/onadata/apps/logger/south_migrations/0027_added_instance_is_deleted.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Instance.is_deleted' - db.add_column('odk_logger_instance', 'is_deleted', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=True) - # Adding index on 'Instance', fields ['xform'] - db.create_index('odk_logger_instance', ['xform_id', 'is_deleted']) - - - def backwards(self, orm): - # Removing index on 'Instance', fields ['xform'] - db.delete_index('odk_logger_instance', ['xform_id', 'is_deleted']) - # Deleting field 'Instance.is_deleted' - db.delete_column('odk_logger_instance', 'is_deleted') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0028_update_is_deleted_field.py b/onadata/apps/logger/south_migrations/0028_update_is_deleted_field.py deleted file mode 100644 index 24052960c..000000000 --- a/onadata/apps/logger/south_migrations/0028_update_is_deleted_field.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - no_dry_run = True - - def forwards(self, orm): - # update values - db.execute("UPDATE odk_logger_instance SET is_deleted=%s WHERE deleted_at IS NOT NULL", [True]) - - def backwards(self, orm): - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '20', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0029_auto__chg_field_attachment_mimetype__add_field_xform_encrypted__add_fi.py b/onadata/apps/logger/south_migrations/0029_auto__chg_field_attachment_mimetype__add_field_xform_encrypted__add_fi.py deleted file mode 100644 index b6b3f135f..000000000 --- a/onadata/apps/logger/south_migrations/0029_auto__chg_field_attachment_mimetype__add_field_xform_encrypted__add_fi.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Attachment.mimetype' - db.alter_column('odk_logger_attachment', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=50)) - - # Adding field 'XForm.surveys_with_geopoints' - db.add_column('odk_logger_xform', 'surveys_with_geopoints', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - - # Changing field 'Attachment.mimetype' - db.alter_column('odk_logger_attachment', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=20)) - - # Deleting field 'XForm.surveys_with_geopoints' - db.delete_column('odk_logger_xform', 'surveys_with_geopoints') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0030_auto__add_field_xform_num_of_submissions.py b/onadata/apps/logger/south_migrations/0030_auto__add_field_xform_num_of_submissions.py deleted file mode 100644 index b3c8bcd68..000000000 --- a/onadata/apps/logger/south_migrations/0030_auto__add_field_xform_num_of_submissions.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'XForm.num_of_submissions' - db.add_column('odk_logger_xform', 'num_of_submissions', - self.gf('django.db.models.fields.IntegerField')(default=-1), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'XForm.num_of_submissions' - db.delete_column('odk_logger_xform', 'num_of_submissions') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0030_auto__add_ziggyinstance.py b/onadata/apps/logger/south_migrations/0030_auto__add_ziggyinstance.py deleted file mode 100644 index 2d9fa0ab3..000000000 --- a/onadata/apps/logger/south_migrations/0030_auto__add_ziggyinstance.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'ZiggyInstance' - db.create_table('odk_logger_ziggyinstance', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('entity_id', self.gf('django.db.models.fields.CharField')(max_length=249)), - ('instance_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=249)), - ('form_instance', self.gf('django.db.models.fields.TextField')()), - ('reporter', self.gf('django.db.models.fields.related.ForeignKey')(related_name='ziggys', to=orm['auth.User'])), - ('client_version', self.gf('django.db.models.fields.BigIntegerField')(default=None, null=True)), - ('server_version', self.gf('django.db.models.fields.BigIntegerField')()), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - ('date_deleted', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True)), - )) - db.send_create_signal('odk_logger', ['ZiggyInstance']) - - - def backwards(self, orm): - # Deleting model 'ZiggyInstance' - db.delete_table('odk_logger_ziggyinstance') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0031_auto__add_field_xform_last_submission_time.py b/onadata/apps/logger/south_migrations/0031_auto__add_field_xform_last_submission_time.py deleted file mode 100644 index 30cf542f5..000000000 --- a/onadata/apps/logger/south_migrations/0031_auto__add_field_xform_last_submission_time.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'XForm.last_submission_time' - db.add_column('odk_logger_xform', 'last_submission_time', - self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'XForm.last_submission_time' - db.delete_column('odk_logger_xform', 'last_submission_time') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0031_auto__add_field_ziggyinstance_form_version.py b/onadata/apps/logger/south_migrations/0031_auto__add_field_ziggyinstance_form_version.py deleted file mode 100644 index 3cf07bbc0..000000000 --- a/onadata/apps/logger/south_migrations/0031_auto__add_field_ziggyinstance_form_version.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'ZiggyInstance.form_version' - db.add_column('odk_logger_ziggyinstance', 'form_version', - self.gf('django.db.models.fields.CharField')(default='1.0', max_length=10), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'ZiggyInstance.form_version' - db.delete_column('odk_logger_ziggyinstance', 'form_version') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0032_added_xform_to_ziggy_submissions.py b/onadata/apps/logger/south_migrations/0032_added_xform_to_ziggy_submissions.py deleted file mode 100644 index 4199fbc1b..000000000 --- a/onadata/apps/logger/south_migrations/0032_added_xform_to_ziggy_submissions.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'ZiggyInstance.xform' - db.add_column('odk_logger_ziggyinstance', 'xform', - self.gf('django.db.models.fields.related.ForeignKey')(related_name='ziggy_submissions', null=True, to=orm['odk_logger.XForm']), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'ZiggyInstance.xform' - db.delete_column('odk_logger_ziggyinstance', 'xform_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0032_index_uuid.py b/onadata/apps/logger/south_migrations/0032_index_uuid.py deleted file mode 100644 index 7b5307189..000000000 --- a/onadata/apps/logger/south_migrations/0032_index_uuid.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 -from south.db import db -from south.v2 import SchemaMigration - -class Migration(SchemaMigration): - """Add an index to the uuid columns in both the odk_logger_xform and - odk_logger_instance tables""" - - def forwards(self, orm): - db.execute("create index odk_logger_xform_uuid_idx on odk_logger_xform (uuid)") - db.execute("create index odk_logger_instance_uuid_idx on odk_logger_instance (uuid)") - - def backwards(self, orm): - raise RuntimeError("Cannot reverse this migration.") diff --git a/onadata/apps/logger/south_migrations/0033_add_model_Note.py b/onadata/apps/logger/south_migrations/0033_add_model_Note.py deleted file mode 100644 index 498111d58..000000000 --- a/onadata/apps/logger/south_migrations/0033_add_model_Note.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Note' - db.create_table('odk_logger_note', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('note', self.gf('django.db.models.fields.TextField')()), - ('instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='notes', to=orm['odk_logger.Instance'])), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('odk_logger', ['Note']) - - - def backwards(self, orm): - # Deleting model 'Note' - db.delete_table('odk_logger_note') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0033_auto__chg_field_xform_id_string.py b/onadata/apps/logger/south_migrations/0033_auto__chg_field_xform_id_string.py deleted file mode 100644 index 8cd51a973..000000000 --- a/onadata/apps/logger/south_migrations/0033_auto__chg_field_xform_id_string.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'XForm.id_string' - db.alter_column('odk_logger_xform', 'id_string', self.gf('django.db.models.fields.SlugField')(max_length=100)) - - def backwards(self, orm): - - # Changing field 'XForm.id_string' - db.alter_column('odk_logger_xform', 'id_string', self.gf('django.db.models.fields.SlugField')(max_length=50)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0034_add_field_Instance_json.py b/onadata/apps/logger/south_migrations/0034_add_field_Instance_json.py deleted file mode 100644 index 5a1c82582..000000000 --- a/onadata/apps/logger/south_migrations/0034_add_field_Instance_json.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Instance.json' - db.add_column('odk_logger_instance', 'json', - self.gf('jsonfield.fields.JSONField')(default={}), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Instance.json' - db.delete_column('odk_logger_instance', 'json') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0035_fill_json.py b/onadata/apps/logger/south_migrations/0035_fill_json.py deleted file mode 100644 index 711b56680..000000000 --- a/onadata/apps/logger/south_migrations/0035_fill_json.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -from django.core.exceptions import ValidationError -from south.v2 import DataMigration -from onadata.libs.utils.model_tools import queryset_iterator -from onadata.libs.utils.common_tags import MONGO_STRFTIME, SUBMISSION_TIME, XFORM_ID_STRING -from onadata.apps.logger.models import Instance - -class Migration(DataMigration): - - def forwards(self, orm): - """Add parsed JSON to JSON instance column.""" - for instance in queryset_iterator( - orm['odk_logger.Instance'].objects.all()): - obj = Instance.objects.get(pk=instance.pk) - json = obj.get_dict() - json[SUBMISSION_TIME] = instance.date_created.strftime( - MONGO_STRFTIME) - json[XFORM_ID_STRING] = obj._parser.get_xform_id_string() - instance.json = json - instance.save() - - def backwards(self, orm): - """Remove JSON content.""" - for instance in orm.Instance.objects.all(): - instance.json = '' - instance.save() - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] - symmetrical = True diff --git a/onadata/apps/logger/south_migrations/0036_auto__chg_field_xform_sms_id_string.py b/onadata/apps/logger/south_migrations/0036_auto__chg_field_xform_sms_id_string.py deleted file mode 100644 index 30c78ab9f..000000000 --- a/onadata/apps/logger/south_migrations/0036_auto__chg_field_xform_sms_id_string.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'XForm.sms_id_string' - db.alter_column('odk_logger_xform', 'sms_id_string', self.gf('django.db.models.fields.SlugField')(max_length=100)) - - def backwards(self, orm): - - # Changing field 'XForm.sms_id_string' - db.alter_column('odk_logger_xform', 'sms_id_string', self.gf('django.db.models.fields.SlugField')(max_length=50)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0037_auto__del_field_instance_start_time__del_field_instance_date.py b/onadata/apps/logger/south_migrations/0037_auto__del_field_instance_start_time__del_field_instance_date.py deleted file mode 100644 index 53a1db694..000000000 --- a/onadata/apps/logger/south_migrations/0037_auto__del_field_instance_start_time__del_field_instance_date.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'Instance.start_time' - db.delete_column('odk_logger_instance', 'start_time') - - # Deleting field 'Instance.date' - db.delete_column('odk_logger_instance', 'date') - - - def backwards(self, orm): - # Adding field 'Instance.start_time' - db.add_column('odk_logger_instance', 'start_time', - self.gf('django.db.models.fields.DateTimeField')(null=True), - keep_default=False) - - # Adding field 'Instance.date' - db.add_column('odk_logger_instance', 'date', - self.gf('django.db.models.fields.DateField')(null=True), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0038_auto__del_field_instance_is_deleted.py b/onadata/apps/logger/south_migrations/0038_auto__del_field_instance_is_deleted.py deleted file mode 100644 index c8c254903..000000000 --- a/onadata/apps/logger/south_migrations/0038_auto__del_field_instance_is_deleted.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'Instance.is_deleted' - db.delete_column('odk_logger_instance', 'is_deleted') - - - def backwards(self, orm): - # Adding field 'Instance.is_deleted' - db.add_column('odk_logger_instance', 'is_deleted', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0039_auto__del_field_xform_surveys_with_geopoints__add_field_xform_instance.py b/onadata/apps/logger/south_migrations/0039_auto__del_field_xform_surveys_with_geopoints__add_field_xform_instance.py deleted file mode 100644 index 096843742..000000000 --- a/onadata/apps/logger/south_migrations/0039_auto__del_field_xform_surveys_with_geopoints__add_field_xform_instance.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'XForm.surveys_with_geopoints' - db.delete_column('odk_logger_xform', 'surveys_with_geopoints') - - # Adding field 'XForm.instances_with_geopoints' - db.add_column('odk_logger_xform', 'instances_with_geopoints', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'XForm.surveys_with_geopoints' - db.add_column('odk_logger_xform', 'surveys_with_geopoints', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Deleting field 'XForm.instances_with_geopoints' - db.delete_column('odk_logger_xform', 'instances_with_geopoints') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0040_auto__add_field_instance_geom.py b/onadata/apps/logger/south_migrations/0040_auto__add_field_instance_geom.py deleted file mode 100644 index 13d7f8cd7..000000000 --- a/onadata/apps/logger/south_migrations/0040_auto__add_field_instance_geom.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Instance.geom' - db.add_column('odk_logger_instance', 'geom', - self.gf('django.contrib.gis.db.models.fields.GeometryCollectionField')(null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Instance.geom' - db.delete_column('odk_logger_instance', 'geom') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'geom': ('django.contrib.gis.db.models.fields.GeometryCollectionField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0041_convert_lng_lat_to_points.py b/onadata/apps/logger/south_migrations/0041_convert_lng_lat_to_points.py deleted file mode 100644 index d4920f458..000000000 --- a/onadata/apps/logger/south_migrations/0041_convert_lng_lat_to_points.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -from south.v2 import DataMigration - -from onadata.apps.logger.models.instance import Instance -from onadata.libs.utils.model_tools import queryset_iterator - - -class Migration(DataMigration): - - def forwards(self, orm): - "Parse all instance to add geoms." - for obj in queryset_iterator(orm['odk_logger.Instance'].objects.all()): - instance = Instance.objects.get(pk=obj.pk) - instance.save(force=True) - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['odk_logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'geom': ('django.contrib.gis.db.models.fields.GeometryCollectionField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['odk_logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['odk_logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] - symmetrical = True diff --git a/onadata/apps/logger/south_migrations/0042_remove_odk_prefix.py b/onadata/apps/logger/south_migrations/0042_remove_odk_prefix.py deleted file mode 100644 index f852ec725..000000000 --- a/onadata/apps/logger/south_migrations/0042_remove_odk_prefix.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 - -from south.db import db -from south.v2 import SchemaMigration - -from onadata.libs.data.db import rename_table_pending_creates - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.rename_table('odk_logger_attachment', 'logger_attachment') - db.rename_table('odk_logger_instance', 'logger_instance') - db.rename_table('odk_logger_instancehistory', 'logger_instancehistory') - db.rename_table('odk_logger_note', 'logger_note') - db.rename_table('odk_logger_surveytype', 'logger_surveytype') - db.rename_table('odk_logger_xform', 'logger_xform') - db.rename_table('odk_logger_ziggyinstance', 'logger_ziggyinstance') - - rename_table_pending_creates('odk_logger', 'logger') - - def backwards(self, orm): - db.rename_table('logger_attachment', 'odk_logger_attachment') - db.rename_table('logger_instance', 'odk_logger_instance') - db.rename_table('logger_instancehistory', 'odk_logger_instancehistory') - db.rename_table('logger_note', 'odk_logger_note') - db.rename_table('logger_surveytype', 'odk_logger_surveytype') - db.rename_table('logger_xform', 'odk_logger_xform') - db.rename_table('logger_ziggyinstance', 'odk_logger_ziggyinstance') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'geom': ('django.contrib.gis.db.models.fields.GeometryCollectionField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0043_xform_title_255.py b/onadata/apps/logger/south_migrations/0043_xform_title_255.py deleted file mode 100644 index ec96fb163..000000000 --- a/onadata/apps/logger/south_migrations/0043_xform_title_255.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'XForm.title' - db.alter_column('logger_xform', 'title', self.gf('django.db.models.fields.CharField')(max_length=255)) - - def backwards(self, orm): - - # Changing field 'XForm.title' - db.alter_column('logger_xform', 'title', self.gf('django.db.models.fields.CharField')(max_length=64)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'geom': ('django.contrib.gis.db.models.fields.GeometryCollectionField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0044_auto__del_field_xform_is_crowd_form.py b/onadata/apps/logger/south_migrations/0044_auto__del_field_xform_is_crowd_form.py deleted file mode 100644 index faedb1541..000000000 --- a/onadata/apps/logger/south_migrations/0044_auto__del_field_xform_is_crowd_form.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'XForm.is_crowd_form' - db.delete_column('logger_xform', 'is_crowd_form') - - - def backwards(self, orm): - # Adding field 'XForm.is_crowd_form' - db.add_column('logger_xform', 'is_crowd_form', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'geom': ('django.contrib.gis.db.models.fields.GeometryCollectionField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['logger.XForm']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/0045_auto__add_field_xform_require_auth.py b/onadata/apps/logger/south_migrations/0045_auto__add_field_xform_require_auth.py deleted file mode 100644 index 6621d764c..000000000 --- a/onadata/apps/logger/south_migrations/0045_auto__add_field_xform_require_auth.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'XForm.require_auth' - db.add_column('logger_xform', 'require_auth', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'XForm.require_auth' - db.delete_column('logger_xform', 'require_auth') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.attachment': { - 'Meta': {'object_name': 'Attachment'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attachments'", 'to': "orm['logger.Instance']"}), - 'media_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'geom': ('django.contrib.gis.db.models.fields.GeometryCollectionField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.instancehistory': { - 'Meta': {'object_name': 'InstanceHistory'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'submission_history'", 'to': "orm['logger.Instance']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.note': { - 'Meta': {'object_name': 'Note'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['logger.Instance']"}), - 'note': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.ziggyinstance': { - 'Meta': {'object_name': 'ZiggyInstance'}, - 'client_version': ('django.db.models.fields.BigIntegerField', [], {'default': 'None', 'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_deleted': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '249'}), - 'form_instance': ('django.db.models.fields.TextField', [], {}), - 'form_version': ('django.db.models.fields.CharField', [], {'default': "'1.0'", 'max_length': '10'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '249'}), - 'reporter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggys'", 'to': "orm['auth.User']"}), - 'server_version': ('django.db.models.fields.BigIntegerField', [], {}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ziggy_submissions'", 'null': 'True', 'to': "orm['logger.XForm']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['logger'] diff --git a/onadata/apps/logger/south_migrations/__init__.py b/onadata/apps/logger/south_migrations/__init__.py deleted file mode 100644 index 57d631c3f..000000000 --- a/onadata/apps/logger/south_migrations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding: utf-8 diff --git a/onadata/apps/main/management/commands/remove_odk_prefix.py b/onadata/apps/main/management/commands/remove_odk_prefix.py deleted file mode 100644 index ab58d7560..000000000 --- a/onadata/apps/main/management/commands/remove_odk_prefix.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding: utf-8 -from django.core.management.base import BaseCommand -from django.db import connection -from django.utils.translation import ugettext_lazy - - -class Command(BaseCommand): - help = ugettext_lazy("Remove from logger and viewer apps") - - option_list = BaseCommand.option_list - - def handle(self, *args, **kwargs): - cursor = connection.cursor() - cursor.execute('UPDATE south_migrationhistory SET app_name=%s WHERE ' - 'app_name=%s', ['logger', 'odk_logger']) - cursor.execute('UPDATE south_migrationhistory SET app_name=%s WHERE ' - 'app_name=%s', ['viewer', 'odk_viewer']) diff --git a/onadata/apps/main/south_migrations/0001_initial.py b/onadata/apps/main/south_migrations/0001_initial.py deleted file mode 100644 index 2daa1cd60..000000000 --- a/onadata/apps/main/south_migrations/0001_initial.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - pass - - - def backwards(self, orm): - pass - - - models = { - - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0002_auto__add_userprofile.py b/onadata/apps/main/south_migrations/0002_auto__add_userprofile.py deleted file mode 100644 index e2fbc5ea9..000000000 --- a/onadata/apps/main/south_migrations/0002_auto__add_userprofile.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'UserProfile' - db.create_table('main_userprofile', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('city', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=2, blank=True)), - ('organization', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('home_page', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('twitter', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - )) - db.send_create_signal('main', ['UserProfile']) - - - def backwards(self, orm): - - # Deleting model 'UserProfile' - db.delete_table('main_userprofile') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0003_auto__add_field_userprofile_description.py b/onadata/apps/main/south_migrations/0003_auto__add_field_userprofile_description.py deleted file mode 100644 index b36cb1b0b..000000000 --- a/onadata/apps/main/south_migrations/0003_auto__add_field_userprofile_description.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'UserProfile.description' - db.add_column('main_userprofile', 'description', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'UserProfile.description' - db.delete_column('main_userprofile', 'description') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0004_auto__add_metadata.py b/onadata/apps/main/south_migrations/0004_auto__add_metadata.py deleted file mode 100644 index cc768bb66..000000000 --- a/onadata/apps/main/south_migrations/0004_auto__add_metadata.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'MetaData' - db.create_table('main_metadata', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xform', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['logger.XForm'])), - ('data_type', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('data_value', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal('main', ['MetaData']) - - - def backwards(self, orm): - - # Deleting model 'MetaData' - db.delete_table('main_metadata') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0005_auto__add_field_metadata_data_file.py b/onadata/apps/main/south_migrations/0005_auto__add_field_metadata_data_file.py deleted file mode 100644 index d4411613b..000000000 --- a/onadata/apps/main/south_migrations/0005_auto__add_field_metadata_data_file.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'MetaData.data_file' - db.add_column('main_metadata', 'data_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'MetaData.data_file' - db.delete_column('main_metadata', 'data_file') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0006_auto__add_field_userprofile_require_auth.py b/onadata/apps/main/south_migrations/0006_auto__add_field_userprofile_require_auth.py deleted file mode 100644 index b5c3a7c66..000000000 --- a/onadata/apps/main/south_migrations/0006_auto__add_field_userprofile_require_auth.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'UserProfile.require_auth' - db.add_column('main_userprofile', 'require_auth', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'UserProfile.require_auth' - db.delete_column('main_userprofile', 'require_auth') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0007_auto__add_field_metadata_data_file_type.py b/onadata/apps/main/south_migrations/0007_auto__add_field_metadata_data_file_type.py deleted file mode 100644 index a45a49183..000000000 --- a/onadata/apps/main/south_migrations/0007_auto__add_field_metadata_data_file_type.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'MetaData.data_file_type' - db.add_column('main_metadata', 'data_file_type', self.gf('django.db.models.fields.CharField')(max_length=255, null=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'MetaData.data_file_type' - db.delete_column('main_metadata', 'data_file_type') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0007_replace_special_chars_and_whitespace_in_usernames.py b/onadata/apps/main/south_migrations/0007_replace_special_chars_and_whitespace_in_usernames.py deleted file mode 100644 index 19cb17de8..000000000 --- a/onadata/apps/main/south_migrations/0007_replace_special_chars_and_whitespace_in_usernames.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -import re - -class Migration(DataMigration): - - def forwards(self, orm): - def update_username_for_user(user, match_on, sub_with): - regex = re.compile(match_on) - if regex.search(user.username): - user.username = regex.sub(sub_with, user.username) - user.save() - - # remove whitespace and replace special chars with underscores - for user in orm['auth.User'].objects.all(): - update_username_for_user(user, "\s", "") - update_username_for_user(user, "\W", "_") - - def backwards(self, orm): - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0008_auto__add_tokenstoragemodel.py b/onadata/apps/main/south_migrations/0008_auto__add_tokenstoragemodel.py deleted file mode 100644 index e4d2d0e5a..000000000 --- a/onadata/apps/main/south_migrations/0008_auto__add_tokenstoragemodel.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'TokenStorageModel' - db.create_table('main_tokenstoragemodel', ( - ('id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], primary_key=True)), - ('token', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('main', ['TokenStorageModel']) - - - def backwards(self, orm): - - # Deleting model 'TokenStorageModel' - db.delete_table('main_tokenstoragemodel') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.tokenstoragemodel': { - 'Meta': {'object_name': 'TokenStorageModel'}, - 'id': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'primary_key': 'True'}), - 'token': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0009_auto__add_field_userprofile_address__add_field_userprofile_phonenumber.py b/onadata/apps/main/south_migrations/0009_auto__add_field_userprofile_address__add_field_userprofile_phonenumber.py deleted file mode 100644 index 42cec933c..000000000 --- a/onadata/apps/main/south_migrations/0009_auto__add_field_userprofile_address__add_field_userprofile_phonenumber.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.address' - db.add_column('main_userprofile', 'address', - self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), - keep_default=False) - - # Adding field 'UserProfile.phonenumber' - db.add_column('main_userprofile', 'phonenumber', - self.gf('django.db.models.fields.CharField')(default='', max_length=30, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.address' - db.delete_column('main_userprofile', 'address') - - # Deleting field 'UserProfile.phonenumber' - db.delete_column('main_userprofile', 'phonenumber') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.tokenstoragemodel': { - 'Meta': {'object_name': 'TokenStorageModel'}, - 'id': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'google_id'", 'primary_key': 'True', 'to': "orm['auth.User']"}), - 'token': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0010_auto__add_field_userprofile_created_by.py b/onadata/apps/main/south_migrations/0010_auto__add_field_userprofile_created_by.py deleted file mode 100644 index 937350ef7..000000000 --- a/onadata/apps/main/south_migrations/0010_auto__add_field_userprofile_created_by.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.created_by' - db.add_column('main_userprofile', 'created_by', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.created_by' - db.delete_column('main_userprofile', 'created_by_id') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.tokenstoragemodel': { - 'Meta': {'object_name': 'TokenStorageModel'}, - 'id': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'google_id'", 'primary_key': 'True', 'to': "orm['auth.User']"}), - 'token': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0011_auto__add_field_userprofile_num_of_submissions.py b/onadata/apps/main/south_migrations/0011_auto__add_field_userprofile_num_of_submissions.py deleted file mode 100644 index 182b16257..000000000 --- a/onadata/apps/main/south_migrations/0011_auto__add_field_userprofile_num_of_submissions.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.num_of_submissions' - db.add_column('main_userprofile', 'num_of_submissions', - self.gf('django.db.models.fields.IntegerField')(default=0), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.num_of_submissions' - db.delete_column('main_userprofile', 'num_of_submissions') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'main.metadata': { - 'Meta': {'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.tokenstoragemodel': { - 'Meta': {'object_name': 'TokenStorageModel'}, - 'id': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'google_id'", 'primary_key': 'True', 'to': "orm['auth.User']"}), - 'token': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '50'}), - 'surveys_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0012_auto__add_unique_metadata_xform_data_type_data_value.py b/onadata/apps/main/south_migrations/0012_auto__add_unique_metadata_xform_data_type_data_value.py deleted file mode 100644 index c38f64fd7..000000000 --- a/onadata/apps/main/south_migrations/0012_auto__add_unique_metadata_xform_data_type_data_value.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'MetaData', fields ['xform', 'data_type', 'data_value'] - M = orm['main.metadata'] - for x in M.objects.all(): - dupes = M.objects.filter(xform_id=x.xform_id, data_type=x.data_type, data_value=x.data_value) - if dupes.count() > 1: - for dupe in dupes[1:]: - print('Deleting duplicate MetaData', dupe.xform_id, dupe.data_type, dupe.data_value) - dupe.delete() - partial_dupes = M.objects.filter(xform_id=x.xform_id, data_type=x.data_type) - if partial_dupes.count() > 1: - print('Partially duplicate MetaData{}'.format('\n\t'.join(map(str, partial_dupes.values_list('xform_id', 'data_type', 'data_value'))))) - - db.create_unique('main_metadata', ['xform_id', 'data_type', 'data_value']) - - def backwards(self, orm): - # Removing unique constraint on 'MetaData', fields ['xform', 'data_type', 'data_value'] - db.delete_unique('main_metadata', ['xform_id', 'data_type', 'data_value']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.metadata': { - 'Meta': {'unique_together': "(('xform', 'data_type', 'data_value'),)", 'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.tokenstoragemodel': { - 'Meta': {'object_name': 'TokenStorageModel'}, - 'id': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'google_id'", 'primary_key': 'True', 'to': "orm['auth.User']"}), - 'token': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0013_auto__add_field_metadata_file_hash.py b/onadata/apps/main/south_migrations/0013_auto__add_field_metadata_file_hash.py deleted file mode 100644 index 68ac011d8..000000000 --- a/onadata/apps/main/south_migrations/0013_auto__add_field_metadata_file_hash.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'MetaData.file_hash' - db.add_column('main_metadata', 'file_hash', - self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'MetaData.file_hash' - db.delete_column('main_metadata', 'file_hash') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.metadata': { - 'Meta': {'unique_together': "(('xform', 'data_type', 'data_value'),)", 'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'file_hash': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.tokenstoragemodel': { - 'Meta': {'object_name': 'TokenStorageModel'}, - 'id': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'google_id'", 'primary_key': 'True', 'to': "orm['auth.User']"}), - 'token': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/0014_added_metadata_field_to_user_profile.py b/onadata/apps/main/south_migrations/0014_added_metadata_field_to_user_profile.py deleted file mode 100644 index bbad5c7ea..000000000 --- a/onadata/apps/main/south_migrations/0014_added_metadata_field_to_user_profile.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.metadata' - db.add_column('main_userprofile', 'metadata', - self.gf('jsonfield.fields.JSONField')(default={}, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.metadata' - db.delete_column('main_userprofile', 'metadata') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'main.metadata': { - 'Meta': {'unique_together': "(('xform', 'data_type', 'data_value'),)", 'object_name': 'MetaData'}, - 'data_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'data_file_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'data_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'data_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'file_hash': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'main.tokenstoragemodel': { - 'Meta': {'object_name': 'TokenStorageModel'}, - 'id': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'google_id'", 'primary_key': 'True', 'to': "orm['auth.User']"}), - 'token': ('django.db.models.fields.TextField', [], {}) - }, - 'main.userprofile': { - 'Meta': {'object_name': 'UserProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'home_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata': ('jsonfield.fields.JSONField', [], {'default': '{}', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'organization': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'phonenumber': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'require_auth': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['main'] diff --git a/onadata/apps/main/south_migrations/__init__.py b/onadata/apps/main/south_migrations/__init__.py deleted file mode 100644 index 57d631c3f..000000000 --- a/onadata/apps/main/south_migrations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding: utf-8 diff --git a/onadata/apps/restservice/south_migrations/0001_initial.py b/onadata/apps/restservice/south_migrations/0001_initial.py deleted file mode 100644 index e8485649f..000000000 --- a/onadata/apps/restservice/south_migrations/0001_initial.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'RestService' - db.create_table('restservice_restservice', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('service_url', self.gf('django.db.models.fields.URLField')(max_length=200)), - ('xform', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['logger.XForm'])), - ('name', self.gf('django.db.models.fields.CharField')(max_length=50)), - )) - db.send_create_signal('restservice', ['RestService']) - - - def backwards(self, orm): - - # Deleting model 'RestService' - db.delete_table('restservice_restservice') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'restservice.restservice': { - 'Meta': {'object_name': 'RestService'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'service_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - } - } - - complete_apps = ['restservice'] diff --git a/onadata/apps/restservice/south_migrations/0002_auto__add_unique_restservice_service_url_name_xform.py b/onadata/apps/restservice/south_migrations/0002_auto__add_unique_restservice_service_url_name_xform.py deleted file mode 100644 index eab021706..000000000 --- a/onadata/apps/restservice/south_migrations/0002_auto__add_unique_restservice_service_url_name_xform.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding unique constraint on 'RestService', fields ['service_url', 'name', 'xform'] - db.create_unique('restservice_restservice', ['service_url', 'name', 'xform_id']) - - - def backwards(self, orm): - - # Removing unique constraint on 'RestService', fields ['service_url', 'name', 'xform'] - db.delete_unique('restservice_restservice', ['service_url', 'name', 'xform_id']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'restservice.restservice': { - 'Meta': {'unique_together': "(('service_url', 'xform', 'name'),)", 'object_name': 'RestService'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'service_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - } - } - - complete_apps = ['restservice'] diff --git a/onadata/apps/restservice/south_migrations/__init__.py b/onadata/apps/restservice/south_migrations/__init__.py deleted file mode 100644 index 57d631c3f..000000000 --- a/onadata/apps/restservice/south_migrations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding: utf-8 diff --git a/onadata/apps/viewer/south_migrations/0001_initial.py b/onadata/apps/viewer/south_migrations/0001_initial.py deleted file mode 100644 index 1e94fae91..000000000 --- a/onadata/apps/viewer/south_migrations/0001_initial.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'ParsedInstance' - db.create_table('odk_viewer_parsedinstance', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('instance', self.gf('django.db.models.fields.related.OneToOneField')(related_name='parsed_instance', unique=True, to=orm['logger.Instance'])), - ('start_time', self.gf('django.db.models.fields.DateTimeField')(null=True)), - ('end_time', self.gf('django.db.models.fields.DateTimeField')(null=True)), - ('lat', self.gf('django.db.models.fields.FloatField')(null=True)), - ('lng', self.gf('django.db.models.fields.FloatField')(null=True)), - )) - db.send_create_signal('odk_viewer', ['ParsedInstance']) - - # Adding model 'ColumnRename' - db.create_table('odk_viewer_columnrename', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xpath', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), - ('column_name', self.gf('django.db.models.fields.CharField')(max_length=32)), - )) - db.send_create_signal('odk_viewer', ['ColumnRename']) - - # Adding model 'DataDictionary' - db.create_table('odk_viewer_datadictionary', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xform', self.gf('django.db.models.fields.related.OneToOneField')(related_name='data_dictionary', unique=True, to=orm['logger.XForm'])), - ('json', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('odk_viewer', ['DataDictionary']) - - # Adding model 'InstanceModification' - db.create_table('odk_viewer_instancemodification', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), - ('action', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='modifications', to=orm['logger.Instance'])), - ('xpath', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('odk_viewer', ['InstanceModification']) - - - def backwards(self, orm): - - # Deleting model 'ParsedInstance' - db.delete_table('odk_viewer_parsedinstance') - - # Deleting model 'ColumnRename' - db.delete_table('odk_viewer_columnrename') - - # Deleting model 'DataDictionary' - db.delete_table('odk_viewer_datadictionary') - - # Deleting model 'InstanceModification' - db.delete_table('odk_viewer_instancemodification') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.datadictionary': { - 'Meta': {'object_name': 'DataDictionary'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {}), - 'xform': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'data_dictionary'", 'unique': 'True', 'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0002_auto__add_field_datadictionary_xls.py b/onadata/apps/viewer/south_migrations/0002_auto__add_field_datadictionary_xls.py deleted file mode 100644 index f5eb1e329..000000000 --- a/onadata/apps/viewer/south_migrations/0002_auto__add_field_datadictionary_xls.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'DataDictionary.xls' - db.add_column('odk_viewer_datadictionary', 'xls', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'DataDictionary.xls' - db.delete_column('odk_viewer_datadictionary', 'xls') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['odk_logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'odk_logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.datadictionary': { - 'Meta': {'object_name': 'DataDictionary'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {}), - 'xform': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'data_dictionary'", 'unique': 'True', 'to': "orm['odk_logger.XForm']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['odk_logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['odk_logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0003_auto__add_field_datadictionary_user.py b/onadata/apps/viewer/south_migrations/0003_auto__add_field_datadictionary_user.py deleted file mode 100644 index 31c8f7a8e..000000000 --- a/onadata/apps/viewer/south_migrations/0003_auto__add_field_datadictionary_user.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'DataDictionary.user' - db.add_column('odk_viewer_datadictionary', 'user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'DataDictionary.user' - db.delete_column('odk_viewer_datadictionary', 'user_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.datadictionary': { - 'Meta': {'object_name': 'DataDictionary'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xform': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'data_dictionary'", 'unique': 'True', 'to': "orm['logger.XForm']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0004_auto__add_field_datadictionary_shared.py b/onadata/apps/viewer/south_migrations/0004_auto__add_field_datadictionary_shared.py deleted file mode 100644 index 56b4ff7eb..000000000 --- a/onadata/apps/viewer/south_migrations/0004_auto__add_field_datadictionary_shared.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'DataDictionary.shared' - db.add_column('odk_viewer_datadictionary', 'shared', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'DataDictionary.shared' - db.delete_column('odk_viewer_datadictionary', 'shared') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.datadictionary': { - 'Meta': {'object_name': 'DataDictionary'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xform': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'data_dictionary'", 'unique': 'True', 'to': "orm['logger.XForm']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0005_auto__del_datadictionary.py b/onadata/apps/viewer/south_migrations/0005_auto__del_datadictionary.py deleted file mode 100644 index f791f7042..000000000 --- a/onadata/apps/viewer/south_migrations/0005_auto__del_datadictionary.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Deleting model 'DataDictionary' - db.delete_table('odk_viewer_datadictionary') - - - def backwards(self, orm): - - # Adding model 'DataDictionary' - db.create_table('odk_viewer_datadictionary', ( - ('json', self.gf('django.db.models.fields.TextField')()), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), - ('shared', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('xls', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xform', self.gf('django.db.models.fields.related.OneToOneField')(related_name='data_dictionary', unique=True, to=orm['logger.XForm'])), - )) - db.send_create_signal('odk_viewer', ['DataDictionary']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0006_auto__add_export.py b/onadata/apps/viewer/south_migrations/0006_auto__add_export.py deleted file mode 100644 index 10585caf9..000000000 --- a/onadata/apps/viewer/south_migrations/0006_auto__add_export.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'Export' - db.create_table('odk_viewer_export', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('xform', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['logger.XForm'])), - ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, auto_now_add=True, blank=True)), - ('filename', self.gf('django.db.models.fields.files.FileField')(max_length=100)), - )) - db.send_create_signal('odk_viewer', ['Export']) - - - def backwards(self, orm): - - # Deleting model 'Export' - db.delete_table('odk_viewer_export') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0007_auto__add_field_export_export_type.py b/onadata/apps/viewer/south_migrations/0007_auto__add_field_export_export_type.py deleted file mode 100644 index 99905e817..000000000 --- a/onadata/apps/viewer/south_migrations/0007_auto__add_field_export_export_type.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Export.export_type' - db.add_column('odk_viewer_export', 'export_type', self.gf('django.db.models.fields.CharField')(default='xls', max_length=10), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Export.export_type' - db.delete_column('odk_viewer_export', 'export_type') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filename': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0008_auto__chg_field_export_filename.py b/onadata/apps/viewer/south_migrations/0008_auto__chg_field_export_filename.py deleted file mode 100644 index 7cfdbfd98..000000000 --- a/onadata/apps/viewer/south_migrations/0008_auto__chg_field_export_filename.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Export.filename' - db.alter_column('odk_viewer_export', 'filename', self.gf('django.db.models.fields.CharField')(max_length=255)) - - - def backwards(self, orm): - - # Changing field 'Export.filename' - db.alter_column('odk_viewer_export', 'filename', self.gf('django.db.models.fields.files.FileField')(max_length=100)) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0009_auto__add_field_export_task_id__chg_field_export_filename.py b/onadata/apps/viewer/south_migrations/0009_auto__add_field_export_task_id__chg_field_export_filename.py deleted file mode 100644 index 093ed8638..000000000 --- a/onadata/apps/viewer/south_migrations/0009_auto__add_field_export_task_id__chg_field_export_filename.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Export.task_id' - db.add_column('odk_viewer_export', 'task_id', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) - - # Changing field 'Export.filename' - db.alter_column('odk_viewer_export', 'filename', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) - - - def backwards(self, orm): - - # Deleting field 'Export.task_id' - db.delete_column('odk_viewer_export', 'task_id') - - # Changing field 'Export.filename' - db.alter_column('odk_viewer_export', 'filename', self.gf('django.db.models.fields.CharField')(default=None, max_length=255)) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0010_auto__add_field_export_filepath.py b/onadata/apps/viewer/south_migrations/0010_auto__add_field_export_filepath.py deleted file mode 100644 index d9f972b95..000000000 --- a/onadata/apps/viewer/south_migrations/0010_auto__add_field_export_filepath.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Export.filepath' - db.add_column('odk_viewer_export', 'filepath', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Export.filepath' - db.delete_column('odk_viewer_export', 'filepath') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filepath': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0011_auto__del_field_export_filepath__add_field_export_filedir.py b/onadata/apps/viewer/south_migrations/0011_auto__del_field_export_filepath__add_field_export_filedir.py deleted file mode 100644 index f8c9f9311..000000000 --- a/onadata/apps/viewer/south_migrations/0011_auto__del_field_export_filepath__add_field_export_filedir.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Deleting field 'Export.filepath' - db.delete_column('odk_viewer_export', 'filepath') - - # Adding field 'Export.filedir' - db.add_column('odk_viewer_export', 'filedir', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Adding field 'Export.filepath' - db.add_column('odk_viewer_export', 'filepath', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) - - # Deleting field 'Export.filedir' - db.delete_column('odk_viewer_export', 'filedir') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filedir': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0012_auto__add_field_export_time_of_last_submission.py b/onadata/apps/viewer/south_migrations/0012_auto__add_field_export_time_of_last_submission.py deleted file mode 100644 index c7dadeb64..000000000 --- a/onadata/apps/viewer/south_migrations/0012_auto__add_field_export_time_of_last_submission.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Export.time_of_last_submission' - db.add_column('odk_viewer_export', 'time_of_last_submission', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Export.time_of_last_submission' - db.delete_column('odk_viewer_export', 'time_of_last_submission') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filedir': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'time_of_last_submission': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0013_auto__add_unique_export_filename_xform.py b/onadata/apps/viewer/south_migrations/0013_auto__add_unique_export_filename_xform.py deleted file mode 100644 index 37e3287e9..000000000 --- a/onadata/apps/viewer/south_migrations/0013_auto__add_unique_export_filename_xform.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding unique constraint on 'Export', fields ['filename', 'xform'] - db.create_unique('odk_viewer_export', ['filename', 'xform_id']) - - - def backwards(self, orm): - - # Removing unique constraint on 'Export', fields ['filename', 'xform'] - db.delete_unique('odk_viewer_export', ['filename', 'xform_id']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'unique_together': "(('xform', 'filename'),)", 'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filedir': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'time_of_last_submission': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0014_auto__add_field_export__status.py b/onadata/apps/viewer/south_migrations/0014_auto__add_field_export__status.py deleted file mode 100644 index bfa7e16bb..000000000 --- a/onadata/apps/viewer/south_migrations/0014_auto__add_field_export__status.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Export._status' - db.add_column('odk_viewer_export', '_status', - self.gf('django.db.models.fields.SmallIntegerField')(default=0, max_length=1), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Export._status' - db.delete_column('odk_viewer_export', '_status') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'unique_together': "(('xform', 'filename'),)", 'object_name': 'Export'}, - '_status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'max_length': '1'}), - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filedir': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'time_of_last_submission': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0015_auto__del_field_export__status__add_field_export_internal_status.py b/onadata/apps/viewer/south_migrations/0015_auto__del_field_export__status__add_field_export_internal_status.py deleted file mode 100644 index 5987ad3ef..000000000 --- a/onadata/apps/viewer/south_migrations/0015_auto__del_field_export__status__add_field_export_internal_status.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'Export._status' - db.delete_column('odk_viewer_export', '_status') - - # Adding field 'Export.internal_status' - db.add_column('odk_viewer_export', 'internal_status', - self.gf('django.db.models.fields.SmallIntegerField')(default=0, max_length=1), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'Export._status' - db.add_column('odk_viewer_export', '_status', - self.gf('django.db.models.fields.SmallIntegerField')(default=0, max_length=1), - keep_default=False) - - # Deleting field 'Export.internal_status' - db.delete_column('odk_viewer_export', 'internal_status') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'unique_together': "(('xform', 'filename'),)", 'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'filedir': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'max_length': '1'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'time_of_last_submission': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0016_auto__add_field_export_export_url.py b/onadata/apps/viewer/south_migrations/0016_auto__add_field_export_export_url.py deleted file mode 100644 index 30b535c5a..000000000 --- a/onadata/apps/viewer/south_migrations/0016_auto__add_field_export_export_url.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Export.export_url' - db.add_column('odk_viewer_export', 'export_url', - self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Export.export_url' - db.delete_column('odk_viewer_export', 'export_url') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date': ('django.db.models.fields.DateField', [], {'null': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'),)", 'object_name': 'XForm'}, - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'odk_viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'odk_viewer.export': { - 'Meta': {'unique_together': "(('xform', 'filename'),)", 'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'export_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}), - 'filedir': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'max_length': '1'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'time_of_last_submission': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'odk_viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'odk_viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/0017_remove_odk_prefix.py b/onadata/apps/viewer/south_migrations/0017_remove_odk_prefix.py deleted file mode 100644 index 570d7fcf2..000000000 --- a/onadata/apps/viewer/south_migrations/0017_remove_odk_prefix.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -from south.db import db -from south.v2 import SchemaMigration - -from onadata.libs.data.db import rename_table_pending_creates - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.rename_table('odk_viewer_columnrename', 'viewer_columnrename') - db.rename_table('odk_viewer_export', 'viewer_export') - db.rename_table('odk_viewer_instancemodification', - 'viewer_instancemodification') - db.rename_table('odk_viewer_parsedinstance', 'viewer_parsedinstance') - - rename_table_pending_creates('odk_viewer', 'viewer') - - def backwards(self, orm): - db.rename_table('viewer_columnrename', 'odk_viewer_columnrename') - db.rename_table('viewer_export', 'odk_viewer_export') - db.rename_table('viewer_instancemodification', - 'viewer_instancemodification') - db.rename_table('viewer_parsedinstance', 'odk_viewer_parsedinstance') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'logger.instance': { - 'Meta': {'object_name': 'Instance'}, - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'geom': ('django.contrib.gis.db.models.fields.GeometryCollectionField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'json': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'submitted_via_web'", 'max_length': '20'}), - 'survey_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.SurveyType']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '249'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['logger.XForm']"}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'logger.surveytype': { - 'Meta': {'object_name': 'SurveyType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'logger.xform': { - 'Meta': {'ordering': "('id_string',)", 'unique_together': "(('user', 'id_string'), ('user', 'sms_id_string'))", 'object_name': 'XForm'}, - 'allows_sms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'bamboo_dataset': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '60'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True'}), - 'downloadable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'encrypted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'has_start_time': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'id_string': ('django.db.models.fields.SlugField', [], {'max_length': '100'}), - 'instances_with_geopoints': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_crowd_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'json': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'last_submission_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'num_of_submissions': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), - 'shared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'shared_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'sms_id_string': ('django.db.models.fields.SlugField', [], {'default': "''", 'max_length': '100'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'xforms'", 'null': 'True', 'to': "orm['auth.User']"}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32'}), - 'xls': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}), - 'xml': ('django.db.models.fields.TextField', [], {}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - }, - 'viewer.columnrename': { - 'Meta': {'object_name': 'ColumnRename'}, - 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'viewer.export': { - 'Meta': {'unique_together': "(('xform', 'filename'),)", 'object_name': 'Export'}, - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}), - 'export_type': ('django.db.models.fields.CharField', [], {'default': "'xls'", 'max_length': '10'}), - 'export_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}), - 'filedir': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'max_length': '1'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'time_of_last_submission': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), - 'xform': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['logger.XForm']"}) - }, - 'viewer.instancemodification': { - 'Meta': {'object_name': 'InstanceModification'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'modifications'", 'to': "orm['logger.Instance']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'xpath': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'viewer.parsedinstance': { - 'Meta': {'object_name': 'ParsedInstance'}, - 'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'parsed_instance'", 'unique': 'True', 'to': "orm['logger.Instance']"}), - 'lat': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'lng': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) - } - } - - complete_apps = ['viewer'] diff --git a/onadata/apps/viewer/south_migrations/__init__.py b/onadata/apps/viewer/south_migrations/__init__.py deleted file mode 100644 index 57d631c3f..000000000 --- a/onadata/apps/viewer/south_migrations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding: utf-8 diff --git a/onadata/libs/data/db.py b/onadata/libs/data/db.py index b2a283551..57d631c3f 100644 --- a/onadata/libs/data/db.py +++ b/onadata/libs/data/db.py @@ -1,14 +1 @@ # coding: utf-8 -''' -from south.db import db - - -def rename_table_pending_creates(old_name, new_name): - """Replace app name in db.pending_create_signals to avoid crashing - out at the end of the migration. - """ - create_signals = db.get_pending_creates() - for i in xrange(0, len(create_signals)): - if create_signals[i][0] == old_name: - create_signals[i] = (new_name, create_signals[i][1]) -''' diff --git a/onadata/libs/utils/nose_plugins/SilenceSouth.py b/onadata/libs/utils/nose_plugins/SilenceSouth.py deleted file mode 100644 index abb46b1a8..000000000 --- a/onadata/libs/utils/nose_plugins/SilenceSouth.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding: utf-8 -from nose.plugins import Plugin # noqa - -import logging - - -class SilenceSouth(Plugin): - south_logging_level = logging.ERROR - - def configure(self, options, conf): - super(SilenceSouth, self).configure(options, conf) - logging.getLogger('south').setLevel(self.south_logging_level) diff --git a/onadata/libs/utils/nose_plugins/__init__.py b/onadata/libs/utils/nose_plugins/__init__.py deleted file mode 100644 index 0500c789b..000000000 --- a/onadata/libs/utils/nose_plugins/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# coding: utf-8 -from SilenceSouth import SilenceSouth # noqa diff --git a/onadata/settings/base.py b/onadata/settings/base.py index 6b6d5c535..db98036f3 100644 --- a/onadata/settings/base.py +++ b/onadata/settings/base.py @@ -27,6 +27,7 @@ def skip_suspicious_operations(record): return False return True + BASE_DIR = os.path.dirname(os.path.dirname(__file__)) ONADATA_DIR = BASE_DIR PROJECT_ROOT = os.path.abspath(os.path.join(ONADATA_DIR, '..')) From bb69e777dc777120c7d62d83d2b46fbbc16413f4 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Thu, 20 Aug 2020 12:36:58 -0400 Subject: [PATCH 10/18] fixed conflicts after merge --- kobocat-template/templates/base.html | 2 +- kobocat-template/templates/show.html | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/kobocat-template/templates/base.html b/kobocat-template/templates/base.html index 7b93e3606..fc3de8d3c 100644 --- a/kobocat-template/templates/base.html +++ b/kobocat-template/templates/base.html @@ -33,7 +33,7 @@ - +