<filename>bdn/messaging/migrations/0001_initial.py
# Generated by Django 2.0.2 on 2018-08-28 14:03

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('text', models.TextField(verbose_name='Message text')),
                ('read', models.BooleanField(default=False, verbose_name='Read')),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['created'],
            },
        ),
        migrations.CreateModel(
            name='Thread',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('opponent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Thread opponent')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='self_threads', to=settings.AUTH_USER_MODEL, verbose_name='Thread owner')),
            ],
            options={
                'ordering': ['-modified'],
            },
        ),
        migrations.AddField(
            model_name='message',
            name='dialog',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='messaging.Thread'),
        ),
        migrations.AddField(
            model_name='message',
            name='sender',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to=settings.AUTH_USER_MODEL, verbose_name='Author'),
        ),
    ]

<filename>bdn/messaging/migrations/0001_initial.py
# Generated by Django 2.0.2 on 2018-08-28 14:03

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('text', models.TextField(verbose_name='Message text')),
                ('read', models.BooleanField(default=False, verbose_name='Read')),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['created'],
            },
        ),
        migrations.CreateModel(
            name='Thread',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('opponent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Thread opponent')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='self_threads', to=settings.AUTH_USER_MODEL, verbose_name='Thread owner')),
            ],
            options={
                'ordering': ['-modified'],
            },
        ),
        migrations.AddField(
            model_name='message',
            name='dialog',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='messaging.Thread'),
        ),
        migrations.AddField(
            model_name='message',
            name='sender',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to=settings.AUTH_USER_MODEL, verbose_name='Author'),
        ),
    ]

# Generated by Django 2.0.2 on 2018-08-28 14:03