0003_auto_20210507_1549.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Generated by Django 3.1.7 on 2021-05-07 15:49
  2. from django.db import migrations, models
  3. class Migration(migrations.Migration):
  4. dependencies = [
  5. ("files", "0002_fileblob_organizations"),
  6. ]
  7. operations = [
  8. migrations.RemoveField(
  9. model_name="fileblob",
  10. name="organizations",
  11. ),
  12. migrations.AddField(
  13. model_name="fileblob",
  14. name="size",
  15. field=models.PositiveIntegerField(null=True),
  16. ),
  17. migrations.AlterField(
  18. model_name="fileblob",
  19. name="id",
  20. field=models.AutoField(
  21. auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
  22. ),
  23. ),
  24. migrations.CreateModel(
  25. name="File",
  26. fields=[
  27. (
  28. "id",
  29. models.AutoField(
  30. auto_created=True,
  31. primary_key=True,
  32. serialize=False,
  33. verbose_name="ID",
  34. ),
  35. ),
  36. ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
  37. ("name", models.TextField()),
  38. ("headers", models.JSONField()),
  39. ("size", models.PositiveIntegerField(null=True)),
  40. ("checksum", models.CharField(db_index=True, max_length=40, null=True)),
  41. ("blobs", models.ManyToManyField(to="files.FileBlob")),
  42. ],
  43. options={
  44. "abstract": False,
  45. },
  46. ),
  47. ]