# -*- 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 'Member'
        db.create_table(u'members_member', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('type', self.gf('django.db.models.fields.CharField')(default='individual', max_length=11)),
            ('gender', self.gf('django.db.models.fields.CharField')(max_length=6)),
            ('first_name', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('last_name', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('organization_name', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
            ('email', self.gf('django.db.models.fields.EmailField')(max_length=254)),
            ('home_phone_number', self.gf('django.db.models.fields.CharField')(max_length=25, blank=True)),
            ('mobile_phone_number', self.gf('django.db.models.fields.CharField')(max_length=25, blank=True)),
            ('address', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('postal_code', self.gf('django.db.models.fields.CharField')(max_length=15)),
            ('city', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('country', self.gf('django.db.models.fields.CharField')(max_length=200)),
        ))
        db.send_create_signal(u'members', ['Member'])

        # Adding model 'CryptoKey'
        db.create_table(u'members_cryptokey', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('type', self.gf('django.db.models.fields.CharField')(max_length=3)),
            ('key', self.gf('django.db.models.fields.TextField')()),
            ('member', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['members.Member'])),
        ))
        db.send_create_signal(u'members', ['CryptoKey'])


    def backwards(self, orm):
        # Deleting model 'Member'
        db.delete_table(u'members_member')

        # Deleting model 'CryptoKey'
        db.delete_table(u'members_cryptokey')


    models = {
        u'members.cryptokey': {
            'Meta': {'object_name': 'CryptoKey'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'key': ('django.db.models.fields.TextField', [], {}),
            'member': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['members.Member']"}),
            'type': ('django.db.models.fields.CharField', [], {'max_length': '3'})
        },
        u'members.ldapuser': {
            'Meta': {'object_name': 'LdapUser', 'managed': 'False'},
            'dn': ('django.db.models.fields.CharField', [], {'max_length': '200'})
        },
        u'members.member': {
            'Meta': {'object_name': 'Member'},
            'address': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'country': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '254'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'gender': ('django.db.models.fields.CharField', [], {'max_length': '6'}),
            'home_phone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'mobile_phone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}),
            'organization_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
            'type': ('django.db.models.fields.CharField', [], {'default': "'individual'", 'max_length': '11'})
        }
    }

    complete_apps = ['members']