2022-05-14 07:46:51 +00:00
|
|
|
# Generated by Django 3.2.6 on 2022-01-08 19:27
|
|
|
|
|
|
|
|
from django.db import migrations
|
|
|
|
from django.contrib.auth import get_user_model
|
|
|
|
|
|
|
|
from bookmarks.models import Toast
|
|
|
|
|
|
|
|
User = get_user_model()
|
|
|
|
|
|
|
|
|
|
|
|
def forwards(apps, schema_editor):
|
|
|
|
for user in User.objects.all():
|
2024-01-27 10:29:16 +00:00
|
|
|
toast = Toast(
|
|
|
|
key="web_archive_opt_in_hint",
|
|
|
|
message="The Internet Archive Wayback Machine integration has been disabled by default. Check the Settings to re-enable it.",
|
|
|
|
owner=user,
|
|
|
|
)
|
2022-05-14 07:46:51 +00:00
|
|
|
toast.save()
|
|
|
|
|
|
|
|
|
|
|
|
def reverse(apps, schema_editor):
|
2024-01-27 10:29:16 +00:00
|
|
|
Toast.objects.filter(key="web_archive_opt_in_hint").delete()
|
2022-05-14 07:46:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
2024-01-27 10:29:16 +00:00
|
|
|
("bookmarks", "0012_toast"),
|
2022-05-14 07:46:51 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.RunPython(forwards, reverse),
|
|
|
|
]
|