Coverage for app/venv/lib/python3.14/site-packages/weblate/trans/migrations/0006_alter_change_action.py: 100%
8 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
« 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
5# Generated by Django 4.2.5 on 2023-10-12 08:25
7from django.db import migrations, models
9ACTION_NEW_STRING = 44
12def migrate_changes(apps, schema_editor) -> None:
13 Change = apps.get_model("trans", "Change")
14 Change.objects.filter(action=ACTION_NEW_STRING).delete()
17class Migration(migrations.Migration):
18 dependencies = [
19 ("trans", "0005_alter_change_alert_alter_change_announcement_and_more"),
20 ]
22 operations = [
23 migrations.AlterField(
24 model_name="change",
25 name="action",
26 field=models.IntegerField(
27 choices=[
28 (0, "Resource update"),
29 (1, "Translation completed"),
30 (2, "Translation changed"),
31 (5, "New translation"),
32 (3, "Comment added"),
33 (4, "Suggestion added"),
34 (6, "Automatic translation"),
35 (7, "Suggestion accepted"),
36 (8, "Translation reverted"),
37 (9, "Translation uploaded"),
38 (13, "New source string"),
39 (14, "Component locked"),
40 (15, "Component unlocked"),
41 (17, "Committed changes"),
42 (18, "Pushed changes"),
43 (19, "Reset repository"),
44 (20, "Merged repository"),
45 (21, "Rebased repository"),
46 (22, "Failed merge on repository"),
47 (23, "Failed rebase on repository"),
48 (28, "Failed push on repository"),
49 (24, "Parse error"),
50 (25, "Removed translation"),
51 (26, "Suggestion removed"),
52 (27, "Search and replace"),
53 (29, "Suggestion removed during cleanup"),
54 (30, "Source string changed"),
55 (31, "New string added"),
56 (32, "Bulk status change"),
57 (33, "Changed visibility"),
58 (34, "Added user"),
59 (35, "Removed user"),
60 (36, "Translation approved"),
61 (37, "Marked for edit"),
62 (38, "Removed component"),
63 (39, "Removed project"),
64 (41, "Renamed project"),
65 (42, "Renamed component"),
66 (43, "Moved component"),
67 (45, "New contributor"),
68 (46, "New announcement"),
69 (47, "New alert"),
70 (48, "Added new language"),
71 (49, "Requested new language"),
72 (50, "Created project"),
73 (51, "Created component"),
74 (52, "Invited user"),
75 (53, "Received repository notification"),
76 (54, "Replaced file by upload"),
77 (55, "License changed"),
78 (56, "Contributor agreement changed"),
79 (57, "Screenshot added"),
80 (58, "Screenshot uploaded"),
81 (59, "String updated in the repository"),
82 (60, "Add-on installed"),
83 (61, "Add-on configuration changed"),
84 (62, "Add-on uninstalled"),
85 (63, "Removed string"),
86 (64, "Removed comment"),
87 (65, "Resolved comment"),
88 (66, "Explanation updated"),
89 (67, "Removed category"),
90 (68, "Renamed category"),
91 (69, "Moved category"),
92 (70, "Could not save string"),
93 ],
94 default=2,
95 ),
96 ),
97 migrations.RunPython(migrate_changes, migrations.RunPython.noop, elidable=True),
98 ]