Coverage for apis_core/relations/migrations/0001_initial.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-11-22 07:51 +0000

1# Generated by Django 4.2.13 on 2024-07-02 10:42 

2 

3import django.db.models.deletion 

4from django.db import migrations, models 

5 

6import apis_core.generic.abc 

7 

8 

9class Migration(migrations.Migration): 

10 initial = True 

11 

12 dependencies = [ 

13 ("contenttypes", "0002_remove_content_type_name"), 

14 ] 

15 

16 operations = [ 

17 migrations.CreateModel( 

18 name="Relation", 

19 fields=[ 

20 ( 

21 "id", 

22 models.AutoField( 

23 auto_created=True, 

24 primary_key=True, 

25 serialize=False, 

26 verbose_name="ID", 

27 ), 

28 ), 

29 ("subj_object_id", models.PositiveIntegerField()), 

30 ("obj_object_id", models.PositiveIntegerField()), 

31 ( 

32 "obj_content_type", 

33 models.ForeignKey( 

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

35 related_name="relation_obj_set", 

36 to="contenttypes.contenttype", 

37 ), 

38 ), 

39 ( 

40 "subj_content_type", 

41 models.ForeignKey( 

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

43 related_name="relation_subj_set", 

44 to="contenttypes.contenttype", 

45 ), 

46 ), 

47 ], 

48 bases=(models.Model, apis_core.generic.abc.GenericModel), 

49 ), 

50 ]