From d7962d24a8b027dc1b150f5891a8b4b3e1fb2c82 Mon Sep 17 00:00:00 2001 From: Dr Griffith Rees Date: Sun, 15 Oct 2023 02:30:32 +0100 Subject: [PATCH] feat(fulltext): finish `fulltext/migrations` squash --- fulltext/migrations/0001_initial.py | 15 +++---- ...ashed_0003_remove_fulltext_fixture_path.py | 41 ------------------- fulltext/models.py | 8 ++-- 3 files changed, 10 insertions(+), 54 deletions(-) delete mode 100644 fulltext/migrations/0001_squashed_0003_remove_fulltext_fixture_path.py diff --git a/fulltext/migrations/0001_initial.py b/fulltext/migrations/0001_initial.py index 5427b75e..3ebf9aa7 100644 --- a/fulltext/migrations/0001_initial.py +++ b/fulltext/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.5 on 2023-09-21 14:27 +# Generated by Django 4.2.4 on 2023-10-14 11:04 from django.db import migrations, models @@ -22,18 +22,15 @@ class Migration(migrations.Migration): verbose_name="ID", ), ), - ("created_at", models.DateTimeField(auto_now_add=True)), - ("updated_at", models.DateTimeField(auto_now=True)), ("text", models.TextField()), + ("path", models.CharField(blank=True, max_length=500, null=True)), ( "compressed_path", - models.CharField(blank=True, max_length=200, null=True), - ), - ("path", models.CharField(blank=True, max_length=200, null=True)), - ( - "fixture_path", - models.CharField(blank=True, max_length=200, null=True), + models.CharField(blank=True, max_length=500, null=True), ), + ("errors", models.TextField(blank=True, null=True)), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("updated_at", models.DateTimeField(auto_now=True)), ], ), ] diff --git a/fulltext/migrations/0001_squashed_0003_remove_fulltext_fixture_path.py b/fulltext/migrations/0001_squashed_0003_remove_fulltext_fixture_path.py deleted file mode 100644 index 20b85ed2..00000000 --- a/fulltext/migrations/0001_squashed_0003_remove_fulltext_fixture_path.py +++ /dev/null @@ -1,41 +0,0 @@ -# Generated by Django 4.2.4 on 2023-10-14 11:04 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - replaces = [ - ("fulltext", "0001_initial"), - ("fulltext", "0002_fulltext_errors"), - ("fulltext", "0003_remove_fulltext_fixture_path"), - ] - - initial = True - - dependencies = [] - - operations = [ - migrations.CreateModel( - name="Fulltext", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("created_at", models.DateTimeField(auto_now_add=True)), - ("updated_at", models.DateTimeField(auto_now=True)), - ("text", models.TextField()), - ("path", models.CharField(blank=True, max_length=200, null=True)), - ( - "compressed_path", - models.CharField(blank=True, max_length=200, null=True), - ), - ("errors", models.TextField(blank=True, null=True)), - ], - ), - ] diff --git a/fulltext/models.py b/fulltext/models.py index c4fd5b05..b17a05a7 100644 --- a/fulltext/models.py +++ b/fulltext/models.py @@ -13,6 +13,8 @@ class Fulltext(models.Model): path to `plaintext` (`txt`) source file (if used). If `self.compressed_path` is set, then `path` is to relevant `txt` file when `self.compressed_path` is uncompressed + errors: + `str` records of any logged errors generating this `Fulltext`. created_at: date and time the record is created. This can also be provided by a fixture, for example via `alto2txt2fixture` @@ -22,8 +24,6 @@ class Fulltext(models.Model): This can help keep track of the timing of any changes after, for example, an import from an `alto2txt2fixture` `json` fixture file. - errors: - `str` records of any logged errors generating this `Fulltext`. Example: ```pycon @@ -44,8 +44,8 @@ class Fulltext(models.Model): """ text = models.TextField() - path = models.CharField(max_length=200, blank=True, null=True) - compressed_path = models.CharField(max_length=200, blank=True, null=True) + path = models.CharField(max_length=500, blank=True, null=True) + compressed_path = models.CharField(max_length=500, blank=True, null=True) errors = models.TextField(blank=True, null=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)