text: # -*- 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 index on 'Subscription', fields ['lang']
          db.create_index(u'subscription_subscription', ['lang'])
  
  
      def backwards(self, orm):
          # Removing index on 'Subscription', fields ['lang']
          db.delete_index(u'subscription_subscription', ['lang'])
  
  
      models = {
          u'djcelery.crontabschedule': {
              'Meta': {'ordering': "[u'month_of_year', u'day_of_month', u'day_of_week', u'hour', u'minute']", 'object_name': 'CrontabSchedule'},
              'day_of_month': ('django.db.models.fields.CharField', [], {'default': "u'*'", 'max_length': '64'}),
              'day_of_week': ('django.db.models.fields.CharField', [], {'default': "u'*'", 'max_length': '64'}),
              'hour': ('django.db.models.fields.CharField', [], {'default': "u'*'", 'max_length': '64'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'minute': ('django.db.models.fields.CharField', [], {'default': "u'*'", 'max_length': '64'}),
              'month_of_year': ('django.db.models.fields.CharField', [], {'default': "u'*'", 'max_length': '64'})
          },
          u'djcelery.intervalschedule': {
              'Meta': {'ordering': "[u'period', u'every']", 'object_name': 'IntervalSchedule'},
              'every': ('django.db.models.fields.IntegerField', [], {}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'period': ('django.db.models.fields.CharField', [], {'max_length': '24'})
          },
          u'djcelery.periodictask': {
              'Meta': {'object_name': 'PeriodicTask'},
              'args': ('django.db.models.fields.TextField', [], {'default': "u'[]'", 'blank': 'True'}),
              'crontab': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['djcelery.CrontabSchedule']", 'null': 'True', 'blank': 'True'}),
              'date_changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'exchange': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'interval': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['djcelery.IntervalSchedule']", 'null': 'True', 'blank': 'True'}),
              'kwargs': ('django.db.models.fields.TextField', [], {'default': "u'{}'", 'blank': 'True'}),
              'last_run_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
              'queue': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'routing_key': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'task': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'total_run_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
          },
          u'subscription.message': {
              'Meta': {'object_name': 'Message'},
              'category': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
              'content': ('django.db.models.fields.TextField', [], {}),
              'created_at': ('subscription.models.AutoNewDateTimeField', [], {'blank': 'True'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'lang': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
              'message_set': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'messages'", 'to': u"orm['subscription.MessageSet']"}),
              'sequence_number': ('django.db.models.fields.IntegerField', [], {}),
              'updated_at': ('subscription.models.AutoDateTimeField', [], {'blank': 'True'})
          },
          u'subscription.messageset': {
              'Meta': {'object_name': 'MessageSet'},
              'conversation_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'created_at': ('subscription.models.AutoNewDateTimeField', [], {'blank': 'True'}),
              'default_schedule': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'message_sets'", 'to': u"orm['djcelery.PeriodicTask']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'next_set': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['subscription.MessageSet']", 'null': 'True', 'blank': 'True'}),
              'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'short_name': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
              'updated_at': ('subscription.models.AutoDateTimeField', [], {'blank': 'True'})
          },
          u'subscription.subscription': {
              'Meta': {'object_name': 'Subscription'},
              'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'completed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'contact_key': ('django.db.models.fields.CharField', [], {'max_length': '36'}),
              'created_at': ('subscription.models.AutoNewDateTimeField', [], {'blank': 'True'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'lang': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}),
              'message_set': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'subscribers'", 'to': u"orm['subscription.MessageSet']"}),
              'next_sequence_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
              'process_status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
              'schedule': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'subscriptions'", 'to': u"orm['djcelery.PeriodicTask']"}),
              'to_addr': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
              'updated_at': ('subscription.models.AutoDateTimeField', [], {'blank': 'True'}),
              'user_account': ('django.db.models.fields.CharField', [], {'max_length': '36'})
          }
      }
  
      complete_apps = ['subscription']