Coverage for rest_api/migrations/0053_fileprocessing_processingjob_and_more.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-10 03:22 +0000

1# Generated by Django 4.2.10 on 2024-04-26 13:55 

2 

3from django.db import migrations, models 

4import django.db.models.deletion 

5 

6 

7class Migration(migrations.Migration): 

8 

9 dependencies = [ 

10 ("rest_api", "0052_alter_mutation2annotation_alignment_and_more"), 

11 ] 

12 

13 operations = [ 

14 migrations.CreateModel( 

15 name="FileProcessing", 

16 fields=[ 

17 ( 

18 "id", 

19 models.BigAutoField( 

20 auto_created=True, 

21 primary_key=True, 

22 serialize=False, 

23 verbose_name="ID", 

24 ), 

25 ), 

26 ("file_name", models.CharField(max_length=255, unique=True)), 

27 ], 

28 options={ 

29 "db_table": "file_processing", 

30 }, 

31 ), 

32 migrations.CreateModel( 

33 name="ProcessingJob", 

34 fields=[ 

35 ( 

36 "id", 

37 models.BigAutoField( 

38 auto_created=True, 

39 primary_key=True, 

40 serialize=False, 

41 verbose_name="ID", 

42 ), 

43 ), 

44 ("job_name", models.CharField(db_index=True, max_length=255)), 

45 ( 

46 "status", 

47 models.CharField( 

48 choices=[ 

49 ("Q", "Queued"), 

50 ("IP", "In Progress"), 

51 ("C", "Completed"), 

52 ("F", "Failed"), 

53 ], 

54 default="Q", 

55 max_length=2, 

56 ), 

57 ), 

58 ("entry_time", models.DateTimeField(auto_now=True)), 

59 ], 

60 options={ 

61 "db_table": "processing_job", 

62 }, 

63 ), 

64 migrations.RemoveConstraint( 

65 model_name="importlog", 

66 name="unique_import_log", 

67 ), 

68 migrations.RemoveField( 

69 model_name="importlog", 

70 name="name", 

71 ), 

72 migrations.AddConstraint( 

73 model_name="importlog", 

74 constraint=models.UniqueConstraint( 

75 fields=("file", "updated"), name="unique_import_log" 

76 ), 

77 ), 

78 migrations.AddField( 

79 model_name="fileprocessing", 

80 name="processing_job", 

81 field=models.ForeignKey( 

82 on_delete=django.db.models.deletion.CASCADE, 

83 related_name="files", 

84 to="rest_api.processingjob", 

85 ), 

86 ), 

87 migrations.AlterField( 

88 model_name="importlog", 

89 name="file", 

90 field=models.ForeignKey( 

91 on_delete=django.db.models.deletion.CASCADE, 

92 to="rest_api.fileprocessing", 

93 to_field="file_name", 

94 ), 

95 ), 

96 ]