Coverage for distro_tracker/core/migrations/0003_new_arches.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2026-05-28 16:10 +0000

1# -*- coding: utf-8 -*- 

2 

3from django.db import migrations 

4 

5 

6def forwards_func(apps, schema_editor): 

7 Architecture = apps.get_model("core", "Architecture") 

8 db_alias = schema_editor.connection.alias 

9 Architecture.objects.using(db_alias).bulk_create( 

10 [ 

11 Architecture(name="arc"), 

12 Architecture(name="loong64"), 

13 Architecture(name="mipsr6"), 

14 Architecture(name="mipsr6el"), 

15 Architecture(name="mips64r6"), 

16 Architecture(name="mips64r6el"), 

17 Architecture(name="nios2"), 

18 Architecture(name="riscv64"), 

19 ] 

20 ) 

21 

22 

23class Migration(migrations.Migration): 

24 dependencies = [ 

25 ("core", "0002_initial_data_v2"), 

26 ] 

27 

28 operations = [ 

29 migrations.RunPython( 

30 forwards_func, 

31 ), 

32 ]