# -*- coding: utf-8 -*-
# Generated by Django 1.9b1 on 2015-11-17 15:06
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import yunity.utils.models.field


class Migration(migrations.Migration):

    dependencies = [
        ('yunity', '0002_item'),
    ]

    operations = [
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('name', yunity.utils.models.field.MaxLengthCharField(max_length=255)),
                ('description', models.TextField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GroupMembership',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='yunity.Group')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RenameField(
            model_name='user',
            old_name='date_joined',
            new_name='created_at',
        ),
        migrations.AddField(
            model_name='conversation',
            name='created_at',
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
        migrations.AddField(
            model_name='item',
            name='created_at',
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
        migrations.AlterField(
            model_name='conversationmessage',
            name='created_at',
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
        migrations.AddField(
            model_name='groupmembership',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='group',
            name='members',
            field=models.ManyToManyField(through='yunity.GroupMembership', to=settings.AUTH_USER_MODEL),
        ),
    ]

Add group and creation date field migration
Add group and creation date field migration
