1
0
Fork 0

make snapshots unique again

This commit is contained in:
Nick Sweeting 2020-07-13 12:21:52 -04:00
parent ae208435c9
commit a79dd4685a
2 changed files with 20 additions and 1 deletions

View 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,
),
]

View file

@ -13,7 +13,7 @@ class Snapshot(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
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)
tags = models.CharField(max_length=256, null=True, default=None, db_index=True)