Coverage for product_risk_suite / threat_model / migrations / 0001_initial.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-13 23:42 +0000

1# Generated by Django 6.0.4 on 2026-05-01 22:59 

2 

3import django.db.models.deletion 

4from django.db import migrations, models 

5 

6 

7class Migration(migrations.Migration): 

8 

9 initial = True 

10 

11 dependencies = [ 

12 ('product', '0002_alter_product_analyzes_and_more'), 

13 ] 

14 

15 operations = [ 

16 migrations.CreateModel( 

17 name='ThreatModelConnectionName', 

18 fields=[ 

19 ('name', models.CharField(max_length=255, primary_key=True, serialize=False)), 

20 ], 

21 ), 

22 migrations.CreateModel( 

23 name='ThreatModel', 

24 fields=[ 

25 ('id', models.AutoField(primary_key=True, serialize=False)), 

26 ('slug', models.SlugField(default='', unique=True)), 

27 ('title', models.CharField(max_length=200)), 

28 ('description', models.TextField(blank=True, null=True)), 

29 ('svg', models.FileField(upload_to='uploads/')), 

30 ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='product.product')), 

31 ('connection_names', models.ManyToManyField(blank=True, to='threat_model.threatmodelconnectionname')), 

32 ], 

33 ), 

34 ]