# -*- 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 'Member.gender'
        db.delete_column(u'members_member', 'gender')

        # Adding field 'Member.ldap_cn'
        db.add_column(u'members_member', 'ldap_cn',
                      self.gf('django.db.models.fields.CharField')(default='', max_length=200),
                      keep_default=False)

        # Adding field 'Member.status'
        db.add_column(u'members_member', 'status',
                      self.gf('django.db.models.fields.CharField')(default='non_adherent', max_length=50),
                      keep_default=False)

        # Adding field 'Member.entry_date'
        db.add_column(u'members_member', 'entry_date',
                      self.gf('django.db.models.fields.DateField')(null=True),
                      keep_default=False)

        # Adding field 'Member.resign_date'
        db.add_column(u'members_member', 'resign_date',
                      self.gf('django.db.models.fields.DateField')(null=True),
                      keep_default=False)


        # Changing field 'Member.address'
        db.alter_column(u'members_member', 'address', self.gf('django.db.models.fields.TextField')())

    def backwards(self, orm):
        # Adding field 'Member.gender'
        db.add_column(u'members_member', 'gender',
                      self.gf('django.db.models.fields.CharField')(default='', max_length=6),
                      keep_default=False)

        # Deleting field 'Member.ldap_cn'
        db.delete_column(u'members_member', 'ldap_cn')

        # Deleting field 'Member.status'
        db.delete_column(u'members_member', 'status')

        # Deleting field 'Member.entry_date'
        db.delete_column(u'members_member', 'entry_date')

        # Deleting field 'Member.resign_date'
        db.delete_column(u'members_member', 'resign_date')


        # Changing field 'Member.address'
        db.alter_column(u'members_member', 'address', self.gf('django.db.models.fields.CharField')(max_length=200))

    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.TextField', [], {}),
            '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'}),
            'entry_date': ('django.db.models.fields.DateField', [], {'null': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            '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'}),
            'ldap_cn': ('django.db.models.fields.CharField', [], {'default': "''", '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'}),
            'resign_date': ('django.db.models.fields.DateField', [], {'null': 'True'}),
            'status': ('django.db.models.fields.CharField', [], {'default': "'non_adherent'", 'max_length': '50'}),
            'type': ('django.db.models.fields.CharField', [], {'default': "'individual'", 'max_length': '11'})
        }
    }

    complete_apps = ['members']