0001_initial.py 1022 B

12345678910111213141516171819202122232425262728
  1. # Generated by Django 3.2.5 on 2021-07-09 13:07
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='Message',
  13. fields=[
  14. ('message_id', models.AutoField(primary_key=True, serialize=False)),
  15. ('is_received', models.BooleanField(default=False)),
  16. ('date', models.DateTimeField(auto_now=True)),
  17. ('plaintext', models.CharField(max_length=2048)),
  18. ('fromUser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_user', to=settings.AUTH_USER_MODEL)),
  19. ('toUser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_user', to=settings.AUTH_USER_MODEL)),
  20. ],
  21. ),
  22. ]