text: # -*- 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 'SRV'
          db.create_table('srv', (
              ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
              ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
              ('ttl', self.gf('django.db.models.fields.PositiveIntegerField')(default=3600, null=True, blank=True)),
              ('description', self.gf('django.db.models.fields.CharField')(max_length=1000, null=True, blank=True)),
              ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
              ('label', self.gf('django.db.models.fields.CharField')(max_length=63, null=True, blank=True)),
              ('domain', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['domain.Domain'])),
              ('fqdn', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
              ('target', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
              ('port', self.gf('django.db.models.fields.PositiveIntegerField')()),
              ('priority', self.gf('django.db.models.fields.PositiveIntegerField')()),
              ('weight', self.gf('django.db.models.fields.PositiveIntegerField')()),
          ))
          db.send_create_signal('srv', ['SRV'])
  
          # Adding unique constraint on 'SRV', fields ['label', 'domain', 'target', 'port']
          db.create_unique('srv', ['label', 'domain_id', 'target', 'port'])
  
          # Adding M2M table for field views on 'SRV'
          db.create_table('srv_views', (
              ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
              ('srv', models.ForeignKey(orm['srv.srv'], null=False)),
              ('view', models.ForeignKey(orm['view.view'], null=False))
          ))
          db.create_unique('srv_views', ['srv_id', 'view_id'])
  
  
      def backwards(self, orm):
          # Removing unique constraint on 'SRV', fields ['label', 'domain', 'target', 'port']
          db.delete_unique('srv', ['label', 'domain_id', 'target', 'port'])
  
          # Deleting model 'SRV'
          db.delete_table('srv')
  
          # Removing M2M table for field views on 'SRV'
          db.delete_table('srv_views')
  
  
      models = {
          'domain.domain': {
              'Meta': {'object_name': 'Domain', 'db_table': "'domain'"},
              'delegated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'dirty': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_reverse': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'master_domain': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['domain.Domain']", 'null': 'True', 'blank': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
              'purgeable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'soa': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['soa.SOA']", 'null': 'True', 'blank': 'True'})
          },
          'soa.soa': {
              'Meta': {'unique_together': "(('primary', 'contact', 'description'),)", 'object_name': 'SOA', 'db_table': "'soa'"},
              'contact': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'dirty': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'expire': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1209600'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_signed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'minimum': ('django.db.models.fields.PositiveIntegerField', [], {'default': '180'}),
              'primary': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'refresh': ('django.db.models.fields.PositiveIntegerField', [], {'default': '180'}),
              'retry': ('django.db.models.fields.PositiveIntegerField', [], {'default': '86400'}),
              'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1368821007'}),
              'ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3600', 'null': 'True', 'blank': 'True'})
          },
          'srv.srv': {
              'Meta': {'unique_together': "(('label', 'domain', 'target', 'port'),)", 'object_name': 'SRV', 'db_table': "'srv'"},
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'description': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
              'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['domain.Domain']"}),
              'fqdn': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'label': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}),
              'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'port': ('django.db.models.fields.PositiveIntegerField', [], {}),
              'priority': ('django.db.models.fields.PositiveIntegerField', [], {}),
              'target': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3600', 'null': 'True', 'blank': 'True'}),
              'views': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['view.View']", 'symmetrical': 'False', 'blank': 'True'}),
              'weight': ('django.db.models.fields.PositiveIntegerField', [], {})
          },
          'view.view': {
              'Meta': {'unique_together': "(('name',),)", 'object_name': 'View', 'db_table': "'view'"},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
          }
      }
  
      complete_apps = ['srv']