From 9ba6221a1e8a6015f86c5bebff8dac9558a0f3f1 Mon Sep 17 00:00:00 2001 From: Rafael JPD Date: Fri, 30 Aug 2024 15:01:48 -0300 Subject: [PATCH] =?UTF-8?q?Cria=20arquivo=20de=20migra=C3=A7=C3=A3o=20para?= =?UTF-8?q?=20Top100ArticlesFileEvent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0002_alter_top100articlesfile_status.py | 2 +- .../0002_top100articlesfileevent.py | 91 +++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 tracker/migrations/0002_top100articlesfileevent.py diff --git a/metrics/migrations/0002_alter_top100articlesfile_status.py b/metrics/migrations/0002_alter_top100articlesfile_status.py index 2ff0026..6af0bdf 100644 --- a/metrics/migrations/0002_alter_top100articlesfile_status.py +++ b/metrics/migrations/0002_alter_top100articlesfile_status.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.7 on 2024-08-30 12:27 +# Generated by Django 5.0.7 on 2024-08-30 17:41 from django.db import migrations, models diff --git a/tracker/migrations/0002_top100articlesfileevent.py b/tracker/migrations/0002_top100articlesfileevent.py new file mode 100644 index 0000000..d756ae3 --- /dev/null +++ b/tracker/migrations/0002_top100articlesfileevent.py @@ -0,0 +1,91 @@ +# Generated by Django 5.0.7 on 2024-08-30 17:41 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("metrics", "0002_alter_top100articlesfile_status"), + ("tracker", "0001_initial"), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name="Top100ArticlesFileEvent", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "created", + models.DateTimeField( + auto_now_add=True, verbose_name="Creation date" + ), + ), + ( + "updated", + models.DateTimeField( + auto_now=True, verbose_name="Last update date" + ), + ), + ( + "status", + models.CharField( + blank=True, max_length=64, null=True, verbose_name="Status" + ), + ), + ( + "lines", + models.IntegerField(blank=True, null=True, verbose_name="Lines"), + ), + ( + "message", + models.TextField(blank=True, null=True, verbose_name="Message"), + ), + ( + "creator", + models.ForeignKey( + editable=False, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="%(class)s_creator", + to=settings.AUTH_USER_MODEL, + verbose_name="Creator", + ), + ), + ( + "file", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="metrics.top100articlesfile", + ), + ), + ( + "updated_by", + models.ForeignKey( + blank=True, + editable=False, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="%(class)s_last_mod_user", + to=settings.AUTH_USER_MODEL, + verbose_name="Updater", + ), + ), + ], + options={ + "verbose_name_plural": "Top 100 Article File Reports", + }, + ), + ]