diff --git a/archivebox/core/migrations/0025_alter_snapshot_url_max_length.py b/archivebox/core/migrations/0025_alter_snapshot_url_max_length.py new file mode 100644 index 00000000..3284cb52 --- /dev/null +++ b/archivebox/core/migrations/0025_alter_snapshot_url_max_length.py @@ -0,0 +1,19 @@ +# Generated by hand on 2025-12-29 +# Increases Snapshot.url max_length from 200 to 1600 characters + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0024_assign_default_crawl'), + ] + + operations = [ + migrations.AlterField( + model_name='snapshot', + name='url', + field=models.URLField(max_length=1600, db_index=True), + ), + ] diff --git a/archivebox/core/models.py b/archivebox/core/models.py index c30061c2..dae02514 100755 --- a/archivebox/core/models.py +++ b/archivebox/core/models.py @@ -281,7 +281,7 @@ class Snapshot(ModelWithOutputDir, ModelWithConfig, ModelWithNotes, ModelWithHea created_at = models.DateTimeField(default=timezone.now, db_index=True) modified_at = models.DateTimeField(auto_now=True) - url = models.URLField(unique=False, db_index=True) # URLs can appear in multiple crawls + url = models.URLField(max_length=1600, unique=False, db_index=True) # URLs can appear in multiple crawls timestamp = models.CharField(max_length=32, unique=True, db_index=True, editable=False) bookmarked_at = models.DateTimeField(default=timezone.now, db_index=True) crawl: Crawl = models.ForeignKey(Crawl, on_delete=models.CASCADE, null=False, related_name='snapshot_set', db_index=True) # type: ignore[assignment]