Coverage for app/venv/lib/python3.14/site-packages/weblate/checks/migrations/0001_squashed_weblate_5.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 07:15 +0000

1# Copyright © Michal Čihař <michal@weblate.org> 

2# 

3# SPDX-License-Identifier: GPL-3.0-or-later 

4 

5# Generated by Django 4.2.5 on 2023-09-18 08:16 

6 

7import django.db.models.deletion 

8from django.db import migrations, models 

9 

10from weblate.checks.models import CHECKS 

11 

12 

13class Migration(migrations.Migration): 

14 replaces = [ 

15 ("checks", "0001_squashed_0003_auto_20191212_1441"), 

16 ("checks", "0004_auto_20200516_1821"), 

17 ("checks", "0005_alter_check_options"), 

18 ("checks", "0006_auto_20210923_0807"), 

19 ("checks", "0007_alter_check_unit"), 

20 ] 

21 

22 initial = True 

23 

24 dependencies = [ 

25 ("lang", "0001_squashed_weblate_5"), 

26 ("trans", "0001_squashed_weblate_5"), 

27 ] 

28 

29 operations = [ 

30 migrations.CreateModel( 

31 name="Check", 

32 fields=[ 

33 ( 

34 "id", 

35 models.AutoField( 

36 auto_created=True, 

37 primary_key=True, 

38 serialize=False, 

39 verbose_name="ID", 

40 ), 

41 ), 

42 ( 

43 "name", 

44 models.CharField( 

45 choices=CHECKS.get_choices(), 

46 max_length=50, 

47 ), 

48 ), 

49 ("dismissed", models.BooleanField(db_index=True, default=False)), 

50 ( 

51 "unit", 

52 models.ForeignKey( 

53 db_index=False, 

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

55 to="trans.unit", 

56 ), 

57 ), 

58 ], 

59 options={ 

60 "unique_together": {("unit", "name")}, 

61 "verbose_name": "Quality check", 

62 "verbose_name_plural": "Quality checks", 

63 }, 

64 ), 

65 ]