0001_initial.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Generated by Django 3.2 on 2021-07-17 20:05
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. class Migration(migrations.Migration):
  5. initial = True
  6. dependencies = [
  7. ]
  8. operations = [
  9. migrations.CreateModel(
  10. name='Software',
  11. fields=[
  12. ('name', models.CharField(max_length=50, verbose_name='被测试软件名')),
  13. ('id', models.CharField(default='TestLaboratory_V1_Software_1', max_length=30, primary_key=True, serialize=False, unique=True, verbose_name='被测试软件编号')),
  14. ('type', models.CharField(max_length=20, verbose_name='被测试软件类型')),
  15. ('report_file', models.TextField(null=True, verbose_name='测试报告id文件')),
  16. ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
  17. ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
  18. ('delete', models.BooleanField(default=False)),
  19. ],
  20. options={
  21. 'verbose_name': '被测试软件',
  22. 'verbose_name_plural': '被测试软件',
  23. 'db_table': 'software',
  24. },
  25. ),
  26. migrations.CreateModel(
  27. name='Version',
  28. fields=[
  29. ('id', models.CharField(default='TestLaboratory_V1_Version_1', max_length=30, primary_key=True, serialize=False, unique=True, verbose_name='软件版本')),
  30. ('number', models.CharField(max_length=20, verbose_name='版本号')),
  31. ('version_file', models.TextField(verbose_name='软件路径id文件')),
  32. ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
  33. ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
  34. ('delete', models.BooleanField(default=False)),
  35. ('software', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='software.software', verbose_name='所属软件')),
  36. ],
  37. options={
  38. 'verbose_name': '软件版本',
  39. 'verbose_name_plural': '软件版本',
  40. 'db_table': 'version',
  41. },
  42. ),
  43. ]