-
-
Notifications
You must be signed in to change notification settings - Fork 966
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add-ons: Add AddonActivityLog model and logging
- Loading branch information
Showing
11 changed files
with
291 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright © Michal Čihař <michal@weblate.org> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# Generated by Django 4.2.5 on 2024-02-28 10:14 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("trans", "0012_alter_announcement_notify"), | ||
("addons", "0002_remove_addon_project_scope_addon_project_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="AddonActivityLog", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"event", | ||
models.IntegerField( | ||
choices=[ | ||
(1, "repository post-push"), | ||
(2, "repository post-update"), | ||
(3, "repository pre-commit"), | ||
(4, "repository post-commit"), | ||
(5, "repository post-add"), | ||
(6, "unit post-create"), | ||
(7, "storage post-load"), | ||
(8, "unit post-save"), | ||
(9, "repository pre-update"), | ||
(10, "repository pre-push"), | ||
(11, "daily"), | ||
(12, "component update"), | ||
] | ||
), | ||
), | ||
("created", models.DateTimeField(auto_now_add=True)), | ||
("details", models.JSONField(default=dict)), | ||
( | ||
"addon", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to="addons.addon" | ||
), | ||
), | ||
( | ||
"component", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="trans.component", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "add-on activity log", | ||
"verbose_name_plural": "add-on activity logs", | ||
"ordering": ["-created"], | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.