make snapshots unique again
This commit is contained in:
parent
ae208435c9
commit
a79dd4685a
2 changed files with 20 additions and 1 deletions
19
archivebox/core/migrations/0004_auto_20200713_1552.py
Normal file
19
archivebox/core/migrations/0004_auto_20200713_1552.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 3.0.7 on 2020-07-13 15:52
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0003_auto_20200630_1034'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='snapshot',
|
||||||
|
name='timestamp',
|
||||||
|
field=models.CharField(db_index=True, default=None, max_length=32, unique=True),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
|
@ -13,7 +13,7 @@ class Snapshot(models.Model):
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
|
|
||||||
url = models.URLField(unique=True)
|
url = models.URLField(unique=True)
|
||||||
timestamp = models.CharField(max_length=32, null=True, default=None, db_index=True)
|
timestamp = models.CharField(max_length=32, unique=True, db_index=True)
|
||||||
|
|
||||||
title = models.CharField(max_length=128, null=True, default=None, db_index=True)
|
title = models.CharField(max_length=128, null=True, default=None, db_index=True)
|
||||||
tags = models.CharField(max_length=256, null=True, default=None, db_index=True)
|
tags = models.CharField(max_length=256, null=True, default=None, db_index=True)
|
||||||
|
|
Loading…
Reference in a new issue