due to some unexpected behavior the share link uuid values were not random. All already created share links were disabled.
26 lines
592 B
Python
26 lines
592 B
Python
# Generated by Django 3.0.7 on 2020-06-25 19:57
|
|
|
|
from django.db import migrations, models
|
|
import uuid
|
|
|
|
|
|
def invalidate_shares(apps, schema_editor):
|
|
ShareLink = apps.get_model('cookbook', 'ShareLink')
|
|
|
|
ShareLink.objects.all().delete()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
('cookbook', '0055_auto_20200616_1236'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name='sharelink',
|
|
name='uuid',
|
|
field=models.UUIDField(default=uuid.uuid4),
|
|
),
|
|
migrations.RunPython(invalidate_shares)
|
|
]
|