0003_auto_20210509_1658.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Generated by Django 3.2.1 on 2021-05-09 16:58
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. class Migration(migrations.Migration):
  5. dependencies = [
  6. ('files', '0004_auto_20210509_1658'),
  7. ('releases', '0002_auto_20201227_1518'),
  8. ]
  9. operations = [
  10. migrations.CreateModel(
  11. name='ReleaseFile',
  12. fields=[
  13. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  14. ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
  15. ('ident', models.CharField(max_length=40)),
  16. ('name', models.TextField()),
  17. ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='files.file')),
  18. ('release', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='releases.release')),
  19. ],
  20. options={
  21. 'unique_together': {('release', 'file'), ('release', 'ident')},
  22. },
  23. ),
  24. migrations.AddField(
  25. model_name='release',
  26. name='files',
  27. field=models.ManyToManyField(through='releases.ReleaseFile', to='files.File'),
  28. ),
  29. ]