# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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."
        # Note: Don't use "from appname.models import ModelName". 
        # Use orm.ModelName to refer to models in this application,
        # and orm['appname.ModelName'] for models in other applications.
        for old_u in orm['auth.User'].objects.select_related('profile').all():
            kwargs = dict(
                        date_joined=old_u.date_joined,
                        username=old_u.username,
                        email=old_u.email,
                        first_name=old_u.first_name,
                        id=old_u.id,
                        is_active=old_u.is_active,
                        is_staff=old_u.is_staff,
                        is_superuser=old_u.is_superuser,
                        last_login=old_u.last_login,
                        last_name=old_u.last_name,
                        password=old_u.password,
            )
            try:
                profile = old_u.profile
                kwargs.update(
                    title=profile.title,
                    type=profile.type,
                    avatar=profile.avatar,
                    min_avatar=profile.min_avatar,
                    avatar_coords=profile.avatar_coords,
                    birthday=profile.birthday,
                    description=profile.description,
                    friends_count=profile.friends_count,
                    activation_code=profile.activation_code,
                    activation_code_expire=profile.activation_code_expire,
                    country=profile.country,
                    region=profile.region,
                    city=profile.city,
                    work_type=profile.work_type,
                    work_company=profile.work_company,
                    schools=profile.schools,
                    courses=profile.courses,
                    hobby=profile.hobby,
                    fav_movies=profile.fav_movies,
                    fav_music=profile.fav_music,
                    fav_books=profile.fav_books,
                    nickname=profile.nickname,
                    gender=profile.gender,
                    info_name=profile.info_name,
                    info_second_name=profile.info_second_name,
                    info_middle_name=profile.info_middle_name,
                    info_address=profile.info_address,
                    info_postal_address=profile.info_postal_address,
                    info_phone=profile.info_phone,
                    info_mobile_phone=profile.info_mobile_phone,
                    info_email=profile.info_email,
                    info_organization=profile.info_organization,
                    info_organization_form=profile.info_organization_form,
                    views_count=profile.views_count,
                )
            except orm.Profile.DoesNotExist:
                pass
            new_u = orm.CustomUser.objects.create(**kwargs)
            for perm in old_u.user_permissions.all():
                new_u.user_permissions.add(perm)
            for group in old_u.groups.all():
                new_u.groups.add(group)

    def backwards(self, orm):
        "Write your backwards methods here."

    models = {
        u'accounts.customuser': {
            'Meta': {'object_name': 'CustomUser'},
            'activation_code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
            'activation_code_expire': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'avatar_coords': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'birthday': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'courses': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'fav_books': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_movies': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_music': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'friends_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            'gender': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            'hobby': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'info_address': ('django.db.models.fields.TextField', [], {}),
            'info_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
            'info_middle_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}),
            'info_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_organization': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_organization_form': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_phone': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
            'info_postal_address': ('django.db.models.fields.TextField', [], {}),
            'info_second_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': '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'}),
            'min_avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'schools': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'type': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_index': 'True'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
            'views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
            'work_company': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'work_type': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
        },
        u'accounts.faculty': {
            'Meta': {'object_name': 'Faculty'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'accounts.profile': {
            'Meta': {'object_name': 'Profile', '_ormbases': [u'auth.User']},
            'activation_code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
            'activation_code_expire': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'avatar_coords': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'birthday': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'courses': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_books': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_movies': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_music': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'friends_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            'gender': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'hobby': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'info_address': ('django.db.models.fields.TextField', [], {}),
            'info_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
            'info_middle_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}),
            'info_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_organization': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_organization_form': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_phone': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
            'info_postal_address': ('django.db.models.fields.TextField', [], {}),
            'info_second_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'min_avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'schools': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'type': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_index': 'True'}),
            u'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
            'views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
            'work_company': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'work_type': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
        },
        u'accounts.service': {
            'Meta': {'object_name': 'Service'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'accounts.teacher': {
            'Meta': {'object_name': 'Teacher'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'photo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
            'photo_min': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'})
        },
        u'accounts.teammate': {
            'Meta': {'object_name': 'Teammate'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'photo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
            'photo_min': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'})
        },
        u'auth.group': {
            'Meta': {'object_name': 'Group'},
            u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        u'auth.permission': {
            'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'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': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
        },
        u'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'}),
            u'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'})
        }
    }

    complete_apps = ['accounts', 'accounts']
    symmetrical = True

7aba4fda43e69854da1883073e67ed2ceb365cc5
<mask token>


class Migration(DataMigration):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(DataMigration):

    def forwards(self, orm):
        """Write your forwards methods here."""
        for old_u in orm['auth.User'].objects.select_related('profile').all():
            kwargs = dict(date_joined=old_u.date_joined, username=old_u.
                username, email=old_u.email, first_name=old_u.first_name,
                id=old_u.id, is_active=old_u.is_active, is_staff=old_u.
                is_staff, is_superuser=old_u.is_superuser, last_login=old_u
                .last_login, last_name=old_u.last_name, password=old_u.password
                )
            try:
                profile = old_u.profile
                kwargs.update(title=profile.title, type=profile.type,
                    avatar=profile.avatar, min_avatar=profile.min_avatar,
                    avatar_coords=profile.avatar_coords, birthday=profile.
                    birthday, description=profile.description,
                    friends_count=profile.friends_count, activation_code=
                    profile.activation_code, activation_code_expire=profile
                    .activation_code_expire, country=profile.country,
                    region=profile.region, city=profile.city, work_type=
                    profile.work_type, work_company=profile.work_company,
                    schools=profile.schools, courses=profile.courses, hobby
                    =profile.hobby, fav_movies=profile.fav_movies,
                    fav_music=profile.fav_music, fav_books=profile.
                    fav_books, nickname=profile.nickname, gender=profile.
                    gender, info_name=profile.info_name, info_second_name=
                    profile.info_second_name, info_middle_name=profile.
                    info_middle_name, info_address=profile.info_address,
                    info_postal_address=profile.info_postal_address,
                    info_phone=profile.info_phone, info_mobile_phone=
                    profile.info_mobile_phone, info_email=profile.
                    info_email, info_organization=profile.info_organization,
                    info_organization_form=profile.info_organization_form,
                    views_count=profile.views_count)
            except orm.Profile.DoesNotExist:
                pass
            new_u = orm.CustomUser.objects.create(**kwargs)
            for perm in old_u.user_permissions.all():
                new_u.user_permissions.add(perm)
            for group in old_u.groups.all():
                new_u.groups.add(group)

    def backwards(self, orm):
        """Write your backwards methods here."""
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(DataMigration):

    def forwards(self, orm):
        """Write your forwards methods here."""
        for old_u in orm['auth.User'].objects.select_related('profile').all():
            kwargs = dict(date_joined=old_u.date_joined, username=old_u.
                username, email=old_u.email, first_name=old_u.first_name,
                id=old_u.id, is_active=old_u.is_active, is_staff=old_u.
                is_staff, is_superuser=old_u.is_superuser, last_login=old_u
                .last_login, last_name=old_u.last_name, password=old_u.password
                )
            try:
                profile = old_u.profile
                kwargs.update(title=profile.title, type=profile.type,
                    avatar=profile.avatar, min_avatar=profile.min_avatar,
                    avatar_coords=profile.avatar_coords, birthday=profile.
                    birthday, description=profile.description,
                    friends_count=profile.friends_count, activation_code=
                    profile.activation_code, activation_code_expire=profile
                    .activation_code_expire, country=profile.country,
                    region=profile.region, city=profile.city, work_type=
                    profile.work_type, work_company=profile.work_company,
                    schools=profile.schools, courses=profile.courses, hobby
                    =profile.hobby, fav_movies=profile.fav_movies,
                    fav_music=profile.fav_music, fav_books=profile.
                    fav_books, nickname=profile.nickname, gender=profile.
                    gender, info_name=profile.info_name, info_second_name=
                    profile.info_second_name, info_middle_name=profile.
                    info_middle_name, info_address=profile.info_address,
                    info_postal_address=profile.info_postal_address,
                    info_phone=profile.info_phone, info_mobile_phone=
                    profile.info_mobile_phone, info_email=profile.
                    info_email, info_organization=profile.info_organization,
                    info_organization_form=profile.info_organization_form,
                    views_count=profile.views_count)
            except orm.Profile.DoesNotExist:
                pass
            new_u = orm.CustomUser.objects.create(**kwargs)
            for perm in old_u.user_permissions.all():
                new_u.user_permissions.add(perm)
            for group in old_u.groups.all():
                new_u.groups.add(group)

    def backwards(self, orm):
        """Write your backwards methods here."""
    models = {u'accounts.customuser': {'Meta': {'object_name': 'CustomUser'
        }, 'activation_code': ('django.db.models.fields.CharField', [], {
        'max_length': '32', 'null': 'True', 'blank': 'True'}),
        'activation_code_expire': ('django.db.models.fields.DateTimeField',
        [], {'null': 'True', 'blank': 'True'}), 'avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'avatar_coords': (
        'django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'birthday': (
        'django.db.models.fields.DateField', [], {'null': 'True', 'blank':
        'True'}), 'city': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'country':
        ('django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'courses': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'date_joined': ('django.db.models.fields.DateTimeField',
        [], {'default': 'datetime.datetime.now'}), 'description': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'email': ('django.db.models.fields.EmailField', [], {
        'max_length': '75', 'blank': 'True'}), 'fav_books': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'fav_movies': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'}), 'fav_music': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'first_name': ('django.db.models.fields.CharField', [], {
        'max_length': '30', 'blank': 'True'}), 'friends_count': (
        'django.db.models.fields.IntegerField', [], {'default': '0'}),
        'gender': ('django.db.models.fields.IntegerField', [], {'null':
        'True', 'blank': 'True'}), 'groups': (
        'django.db.models.fields.related.ManyToManyField', [], {'to':
        u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
        'hobby': ('django.db.models.fields.TextField', [], {'null': 'True',
        'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [],
        {'primary_key': 'True'}), 'info_address': (
        'django.db.models.fields.TextField', [], {}), 'info_email': (
        'django.db.models.fields.EmailField', [], {'max_length': '75'}),
        'info_middle_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': 'True'}), 'info_mobile_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '12',
        'null': 'True', 'blank': 'True'}), 'info_name': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True'}), 'info_organization': (
        'django.db.models.fields.CharField', [], {'max_length': '255'}),
        'info_organization_form': ('django.db.models.fields.CharField', [],
        {'max_length': '255'}), 'info_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '40'}),
        'info_postal_address': ('django.db.models.fields.TextField', [], {}
        ), 'info_second_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': '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'}), 'min_avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'nickname': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True', 'blank': 'True'}), 'password': (
        'django.db.models.fields.CharField', [], {'max_length': '128'}),
        'region': ('django.db.models.fields.CharField', [], {'max_length':
        '255', 'null': 'True', 'blank': 'True'}), 'schools': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'title': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'type': (
        'django.db.models.fields.IntegerField', [], {'default': '1',
        'db_index': 'True'}), 'user_permissions': (
        'django.db.models.fields.related.ManyToManyField', [], {'to':
        u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}
        ), 'username': ('django.db.models.fields.CharField', [], {'unique':
        'True', 'max_length': '30'}), 'views_count': (
        'django.db.models.fields.IntegerField', [], {'default': '0', 'null':
        'True', 'blank': 'True'}), 'work_company': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'work_type': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'})}, u'accounts.faculty': {'Meta': {
        'object_name': 'Faculty'}, 'description': (
        'django.db.models.fields.TextField', [], {}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'owner': ('django.db.models.fields.related.ForeignKey', [], {'to':
        u"orm['auth.User']"}), 'title': (
        'django.db.models.fields.CharField', [], {'max_length': '255'})},
        u'accounts.profile': {'Meta': {'object_name': 'Profile',
        '_ormbases': [u'auth.User']}, 'activation_code': (
        'django.db.models.fields.CharField', [], {'max_length': '32',
        'null': 'True', 'blank': 'True'}), 'activation_code_expire': (
        'django.db.models.fields.DateTimeField', [], {'null': 'True',
        'blank': 'True'}), 'avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'avatar_coords': (
        'django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'birthday': (
        'django.db.models.fields.DateField', [], {'null': 'True', 'blank':
        'True'}), 'city': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'country':
        ('django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'courses': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'description': ('django.db.models.fields.TextField', [],
        {'null': 'True', 'blank': 'True'}), 'fav_books': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'fav_movies': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'}), 'fav_music': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'friends_count': ('django.db.models.fields.IntegerField',
        [], {'default': '0'}), 'gender': (
        'django.db.models.fields.IntegerField', [], {'null': 'True',
        'blank': 'True'}), 'hobby': ('django.db.models.fields.TextField', [
        ], {'null': 'True', 'blank': 'True'}), 'info_address': (
        'django.db.models.fields.TextField', [], {}), 'info_email': (
        'django.db.models.fields.EmailField', [], {'max_length': '75'}),
        'info_middle_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': 'True'}), 'info_mobile_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '12',
        'null': 'True', 'blank': 'True'}), 'info_name': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True'}), 'info_organization': (
        'django.db.models.fields.CharField', [], {'max_length': '255'}),
        'info_organization_form': ('django.db.models.fields.CharField', [],
        {'max_length': '255'}), 'info_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '40'}),
        'info_postal_address': ('django.db.models.fields.TextField', [], {}
        ), 'info_second_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': 'True'}), 'min_avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'nickname': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True', 'blank': 'True'}), 'region': (
        'django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'schools': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'title': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'type': (
        'django.db.models.fields.IntegerField', [], {'default': '1',
        'db_index': 'True'}), u'user_ptr': (
        'django.db.models.fields.related.OneToOneField', [], {'to':
        u"orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
        'views_count': ('django.db.models.fields.IntegerField', [], {
        'default': '0', 'null': 'True', 'blank': 'True'}), 'work_company':
        ('django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'work_type': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'})}, u'accounts.service': {'Meta': {
        'object_name': 'Service'}, 'description': (
        'django.db.models.fields.TextField', [], {}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'owner': ('django.db.models.fields.related.ForeignKey', [], {'to':
        u"orm['auth.User']"}), 'title': (
        'django.db.models.fields.CharField', [], {'max_length': '255'})},
        u'accounts.teacher': {'Meta': {'object_name': 'Teacher'},
        'description': ('django.db.models.fields.TextField', [], {}), u'id':
        ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'name': ('django.db.models.fields.CharField', [], {'max_length':
        '255'}), 'owner': ('django.db.models.fields.related.ForeignKey', [],
        {'to': u"orm['auth.User']"}), 'photo': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100'}), 'photo_min': ('django.db.models.fields.files.ImageField',
        [], {'max_length': '100', 'blank': 'True'})}, u'accounts.teammate':
        {'Meta': {'object_name': 'Teammate'}, 'description': (
        'django.db.models.fields.TextField', [], {}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'name': ('django.db.models.fields.CharField', [], {'max_length':
        '255'}), 'owner': ('django.db.models.fields.related.ForeignKey', [],
        {'to': u"orm['auth.User']"}), 'photo': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100'}), 'photo_min': ('django.db.models.fields.files.ImageField',
        [], {'max_length': '100', 'blank': 'True'})}, u'auth.group': {
        'Meta': {'object_name': 'Group'}, u'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':
        u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}
        )}, u'auth.permission': {'Meta': {'ordering':
        "(u'content_type__app_label', u'content_type__model', u'codename')",
        'unique_together': "((u'content_type', u'codename'),)",
        'object_name': 'Permission'}, 'codename': (
        'django.db.models.fields.CharField', [], {'max_length': '100'}),
        'content_type': ('django.db.models.fields.related.ForeignKey', [],
        {'to': u"orm['contenttypes.ContentType']"}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'name': ('django.db.models.fields.CharField', [], {'max_length':
        '50'})}, u'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':
        u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
        u'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':
        u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}
        ), 'username': ('django.db.models.fields.CharField', [], {'unique':
        'True', 'max_length': '30'})}, u'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'}),
        u'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'})}}
    complete_apps = ['accounts', 'accounts']
    symmetrical = True

from south.utils import datetime_utils as 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."""
        for old_u in orm['auth.User'].objects.select_related('profile').all():
            kwargs = dict(date_joined=old_u.date_joined, username=old_u.
                username, email=old_u.email, first_name=old_u.first_name,
                id=old_u.id, is_active=old_u.is_active, is_staff=old_u.
                is_staff, is_superuser=old_u.is_superuser, last_login=old_u
                .last_login, last_name=old_u.last_name, password=old_u.password
                )
            try:
                profile = old_u.profile
                kwargs.update(title=profile.title, type=profile.type,
                    avatar=profile.avatar, min_avatar=profile.min_avatar,
                    avatar_coords=profile.avatar_coords, birthday=profile.
                    birthday, description=profile.description,
                    friends_count=profile.friends_count, activation_code=
                    profile.activation_code, activation_code_expire=profile
                    .activation_code_expire, country=profile.country,
                    region=profile.region, city=profile.city, work_type=
                    profile.work_type, work_company=profile.work_company,
                    schools=profile.schools, courses=profile.courses, hobby
                    =profile.hobby, fav_movies=profile.fav_movies,
                    fav_music=profile.fav_music, fav_books=profile.
                    fav_books, nickname=profile.nickname, gender=profile.
                    gender, info_name=profile.info_name, info_second_name=
                    profile.info_second_name, info_middle_name=profile.
                    info_middle_name, info_address=profile.info_address,
                    info_postal_address=profile.info_postal_address,
                    info_phone=profile.info_phone, info_mobile_phone=
                    profile.info_mobile_phone, info_email=profile.
                    info_email, info_organization=profile.info_organization,
                    info_organization_form=profile.info_organization_form,
                    views_count=profile.views_count)
            except orm.Profile.DoesNotExist:
                pass
            new_u = orm.CustomUser.objects.create(**kwargs)
            for perm in old_u.user_permissions.all():
                new_u.user_permissions.add(perm)
            for group in old_u.groups.all():
                new_u.groups.add(group)

    def backwards(self, orm):
        """Write your backwards methods here."""
    models = {u'accounts.customuser': {'Meta': {'object_name': 'CustomUser'
        }, 'activation_code': ('django.db.models.fields.CharField', [], {
        'max_length': '32', 'null': 'True', 'blank': 'True'}),
        'activation_code_expire': ('django.db.models.fields.DateTimeField',
        [], {'null': 'True', 'blank': 'True'}), 'avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'avatar_coords': (
        'django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'birthday': (
        'django.db.models.fields.DateField', [], {'null': 'True', 'blank':
        'True'}), 'city': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'country':
        ('django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'courses': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'date_joined': ('django.db.models.fields.DateTimeField',
        [], {'default': 'datetime.datetime.now'}), 'description': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'email': ('django.db.models.fields.EmailField', [], {
        'max_length': '75', 'blank': 'True'}), 'fav_books': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'fav_movies': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'}), 'fav_music': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'first_name': ('django.db.models.fields.CharField', [], {
        'max_length': '30', 'blank': 'True'}), 'friends_count': (
        'django.db.models.fields.IntegerField', [], {'default': '0'}),
        'gender': ('django.db.models.fields.IntegerField', [], {'null':
        'True', 'blank': 'True'}), 'groups': (
        'django.db.models.fields.related.ManyToManyField', [], {'to':
        u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
        'hobby': ('django.db.models.fields.TextField', [], {'null': 'True',
        'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [],
        {'primary_key': 'True'}), 'info_address': (
        'django.db.models.fields.TextField', [], {}), 'info_email': (
        'django.db.models.fields.EmailField', [], {'max_length': '75'}),
        'info_middle_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': 'True'}), 'info_mobile_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '12',
        'null': 'True', 'blank': 'True'}), 'info_name': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True'}), 'info_organization': (
        'django.db.models.fields.CharField', [], {'max_length': '255'}),
        'info_organization_form': ('django.db.models.fields.CharField', [],
        {'max_length': '255'}), 'info_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '40'}),
        'info_postal_address': ('django.db.models.fields.TextField', [], {}
        ), 'info_second_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': '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'}), 'min_avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'nickname': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True', 'blank': 'True'}), 'password': (
        'django.db.models.fields.CharField', [], {'max_length': '128'}),
        'region': ('django.db.models.fields.CharField', [], {'max_length':
        '255', 'null': 'True', 'blank': 'True'}), 'schools': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'title': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'type': (
        'django.db.models.fields.IntegerField', [], {'default': '1',
        'db_index': 'True'}), 'user_permissions': (
        'django.db.models.fields.related.ManyToManyField', [], {'to':
        u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}
        ), 'username': ('django.db.models.fields.CharField', [], {'unique':
        'True', 'max_length': '30'}), 'views_count': (
        'django.db.models.fields.IntegerField', [], {'default': '0', 'null':
        'True', 'blank': 'True'}), 'work_company': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'work_type': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'})}, u'accounts.faculty': {'Meta': {
        'object_name': 'Faculty'}, 'description': (
        'django.db.models.fields.TextField', [], {}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'owner': ('django.db.models.fields.related.ForeignKey', [], {'to':
        u"orm['auth.User']"}), 'title': (
        'django.db.models.fields.CharField', [], {'max_length': '255'})},
        u'accounts.profile': {'Meta': {'object_name': 'Profile',
        '_ormbases': [u'auth.User']}, 'activation_code': (
        'django.db.models.fields.CharField', [], {'max_length': '32',
        'null': 'True', 'blank': 'True'}), 'activation_code_expire': (
        'django.db.models.fields.DateTimeField', [], {'null': 'True',
        'blank': 'True'}), 'avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'avatar_coords': (
        'django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'birthday': (
        'django.db.models.fields.DateField', [], {'null': 'True', 'blank':
        'True'}), 'city': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'country':
        ('django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'courses': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'description': ('django.db.models.fields.TextField', [],
        {'null': 'True', 'blank': 'True'}), 'fav_books': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'fav_movies': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'}), 'fav_music': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'friends_count': ('django.db.models.fields.IntegerField',
        [], {'default': '0'}), 'gender': (
        'django.db.models.fields.IntegerField', [], {'null': 'True',
        'blank': 'True'}), 'hobby': ('django.db.models.fields.TextField', [
        ], {'null': 'True', 'blank': 'True'}), 'info_address': (
        'django.db.models.fields.TextField', [], {}), 'info_email': (
        'django.db.models.fields.EmailField', [], {'max_length': '75'}),
        'info_middle_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': 'True'}), 'info_mobile_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '12',
        'null': 'True', 'blank': 'True'}), 'info_name': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True'}), 'info_organization': (
        'django.db.models.fields.CharField', [], {'max_length': '255'}),
        'info_organization_form': ('django.db.models.fields.CharField', [],
        {'max_length': '255'}), 'info_phone': (
        'django.db.models.fields.CharField', [], {'max_length': '40'}),
        'info_postal_address': ('django.db.models.fields.TextField', [], {}
        ), 'info_second_name': ('django.db.models.fields.CharField', [], {
        'max_length': '100', 'null': 'True'}), 'min_avatar': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100', 'null': 'True', 'blank': 'True'}), 'nickname': (
        'django.db.models.fields.CharField', [], {'max_length': '100',
        'null': 'True', 'blank': 'True'}), 'region': (
        'django.db.models.fields.CharField', [], {'max_length': '255',
        'null': 'True', 'blank': 'True'}), 'schools': (
        'django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'title': ('django.db.models.fields.CharField', [], {
        'max_length': '255', 'null': 'True', 'blank': 'True'}), 'type': (
        'django.db.models.fields.IntegerField', [], {'default': '1',
        'db_index': 'True'}), u'user_ptr': (
        'django.db.models.fields.related.OneToOneField', [], {'to':
        u"orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
        'views_count': ('django.db.models.fields.IntegerField', [], {
        'default': '0', 'null': 'True', 'blank': 'True'}), 'work_company':
        ('django.db.models.fields.TextField', [], {'null': 'True', 'blank':
        'True'}), 'work_type': ('django.db.models.fields.TextField', [], {
        'null': 'True', 'blank': 'True'})}, u'accounts.service': {'Meta': {
        'object_name': 'Service'}, 'description': (
        'django.db.models.fields.TextField', [], {}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'owner': ('django.db.models.fields.related.ForeignKey', [], {'to':
        u"orm['auth.User']"}), 'title': (
        'django.db.models.fields.CharField', [], {'max_length': '255'})},
        u'accounts.teacher': {'Meta': {'object_name': 'Teacher'},
        'description': ('django.db.models.fields.TextField', [], {}), u'id':
        ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'name': ('django.db.models.fields.CharField', [], {'max_length':
        '255'}), 'owner': ('django.db.models.fields.related.ForeignKey', [],
        {'to': u"orm['auth.User']"}), 'photo': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100'}), 'photo_min': ('django.db.models.fields.files.ImageField',
        [], {'max_length': '100', 'blank': 'True'})}, u'accounts.teammate':
        {'Meta': {'object_name': 'Teammate'}, 'description': (
        'django.db.models.fields.TextField', [], {}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'name': ('django.db.models.fields.CharField', [], {'max_length':
        '255'}), 'owner': ('django.db.models.fields.related.ForeignKey', [],
        {'to': u"orm['auth.User']"}), 'photo': (
        'django.db.models.fields.files.ImageField', [], {'max_length':
        '100'}), 'photo_min': ('django.db.models.fields.files.ImageField',
        [], {'max_length': '100', 'blank': 'True'})}, u'auth.group': {
        'Meta': {'object_name': 'Group'}, u'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':
        u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}
        )}, u'auth.permission': {'Meta': {'ordering':
        "(u'content_type__app_label', u'content_type__model', u'codename')",
        'unique_together': "((u'content_type', u'codename'),)",
        'object_name': 'Permission'}, 'codename': (
        'django.db.models.fields.CharField', [], {'max_length': '100'}),
        'content_type': ('django.db.models.fields.related.ForeignKey', [],
        {'to': u"orm['contenttypes.ContentType']"}), u'id': (
        'django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
        'name': ('django.db.models.fields.CharField', [], {'max_length':
        '50'})}, u'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':
        u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
        u'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':
        u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}
        ), 'username': ('django.db.models.fields.CharField', [], {'unique':
        'True', 'max_length': '30'})}, u'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'}),
        u'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'})}}
    complete_apps = ['accounts', 'accounts']
    symmetrical = True

# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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."
        # Note: Don't use "from appname.models import ModelName". 
        # Use orm.ModelName to refer to models in this application,
        # and orm['appname.ModelName'] for models in other applications.
        for old_u in orm['auth.User'].objects.select_related('profile').all():
            kwargs = dict(
                        date_joined=old_u.date_joined,
                        username=old_u.username,
                        email=old_u.email,
                        first_name=old_u.first_name,
                        id=old_u.id,
                        is_active=old_u.is_active,
                        is_staff=old_u.is_staff,
                        is_superuser=old_u.is_superuser,
                        last_login=old_u.last_login,
                        last_name=old_u.last_name,
                        password=old_u.password,
            )
            try:
                profile = old_u.profile
                kwargs.update(
                    title=profile.title,
                    type=profile.type,
                    avatar=profile.avatar,
                    min_avatar=profile.min_avatar,
                    avatar_coords=profile.avatar_coords,
                    birthday=profile.birthday,
                    description=profile.description,
                    friends_count=profile.friends_count,
                    activation_code=profile.activation_code,
                    activation_code_expire=profile.activation_code_expire,
                    country=profile.country,
                    region=profile.region,
                    city=profile.city,
                    work_type=profile.work_type,
                    work_company=profile.work_company,
                    schools=profile.schools,
                    courses=profile.courses,
                    hobby=profile.hobby,
                    fav_movies=profile.fav_movies,
                    fav_music=profile.fav_music,
                    fav_books=profile.fav_books,
                    nickname=profile.nickname,
                    gender=profile.gender,
                    info_name=profile.info_name,
                    info_second_name=profile.info_second_name,
                    info_middle_name=profile.info_middle_name,
                    info_address=profile.info_address,
                    info_postal_address=profile.info_postal_address,
                    info_phone=profile.info_phone,
                    info_mobile_phone=profile.info_mobile_phone,
                    info_email=profile.info_email,
                    info_organization=profile.info_organization,
                    info_organization_form=profile.info_organization_form,
                    views_count=profile.views_count,
                )
            except orm.Profile.DoesNotExist:
                pass
            new_u = orm.CustomUser.objects.create(**kwargs)
            for perm in old_u.user_permissions.all():
                new_u.user_permissions.add(perm)
            for group in old_u.groups.all():
                new_u.groups.add(group)

    def backwards(self, orm):
        "Write your backwards methods here."

    models = {
        u'accounts.customuser': {
            'Meta': {'object_name': 'CustomUser'},
            'activation_code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
            'activation_code_expire': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'avatar_coords': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'birthday': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'courses': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'fav_books': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_movies': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_music': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'friends_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            'gender': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            'hobby': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'info_address': ('django.db.models.fields.TextField', [], {}),
            'info_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
            'info_middle_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}),
            'info_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_organization': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_organization_form': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_phone': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
            'info_postal_address': ('django.db.models.fields.TextField', [], {}),
            'info_second_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': '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'}),
            'min_avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'schools': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'type': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_index': 'True'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
            'views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
            'work_company': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'work_type': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
        },
        u'accounts.faculty': {
            'Meta': {'object_name': 'Faculty'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'accounts.profile': {
            'Meta': {'object_name': 'Profile', '_ormbases': [u'auth.User']},
            'activation_code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
            'activation_code_expire': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'avatar_coords': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'birthday': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'courses': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_books': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_movies': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'fav_music': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'friends_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            'gender': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'hobby': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'info_address': ('django.db.models.fields.TextField', [], {}),
            'info_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
            'info_middle_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}),
            'info_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'info_organization': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_organization_form': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'info_phone': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
            'info_postal_address': ('django.db.models.fields.TextField', [], {}),
            'info_second_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
            'min_avatar': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'nickname': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'region': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'schools': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'type': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_index': 'True'}),
            u'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
            'views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
            'work_company': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'work_type': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
        },
        u'accounts.service': {
            'Meta': {'object_name': 'Service'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'accounts.teacher': {
            'Meta': {'object_name': 'Teacher'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'photo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
            'photo_min': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'})
        },
        u'accounts.teammate': {
            'Meta': {'object_name': 'Teammate'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
            'photo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
            'photo_min': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'})
        },
        u'auth.group': {
            'Meta': {'object_name': 'Group'},
            u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        u'auth.permission': {
            'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'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': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
        },
        u'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'}),
            u'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'})
        }
    }

    complete_apps = ['accounts', 'accounts']
    symmetrical = True
