<filename>api/migrations/0014_auto_20201128_0654.py<gh_stars>0
# Generated by Django 3.1.3 on 2020-11-28 06:54

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0013_auto_20201128_0608'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='chat',
            name='chats',
        ),
        migrations.RemoveField(
            model_name='chat',
            name='user',
        ),
        migrations.AddField(
            model_name='chat',
            name='title',
            field=models.CharField(default='chat', max_length=12, verbose_name='название чата'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='chat',
            name='user1',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='user1', to='api.user', verbose_name='первый пользователь в чате'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='chat',
            name='user2',
            field=models.ForeignKey(default=2, on_delete=django.db.models.deletion.CASCADE, related_name='user2', to='api.user', verbose_name='второй пользователь в чате'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='messages',
            name='chat',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='api.chat', verbose_name='чат'),
        ),
        migrations.DeleteModel(
            name='MessagesInChat',
        ),
    ]
