forked from mirrors/bookwyrm
Updates migrations
This commit is contained in:
parent
38f82fe660
commit
232e4bed79
3 changed files with 19 additions and 7 deletions
|
@ -7,9 +7,8 @@ from bookwyrm.settings import DOMAIN
|
||||||
def remove_self_connector(app_registry, schema_editor):
|
def remove_self_connector(app_registry, schema_editor):
|
||||||
"""set the new phsyical format field based on existing format data"""
|
"""set the new phsyical format field based on existing format data"""
|
||||||
db_alias = schema_editor.connection.alias
|
db_alias = schema_editor.connection.alias
|
||||||
|
|
||||||
app_registry.get_model("bookwyrm", "Connector").objects.using(db_alias).filter(
|
app_registry.get_model("bookwyrm", "Connector").objects.using(db_alias).filter(
|
||||||
local=True
|
connector_file="self_connector"
|
||||||
).delete()
|
).delete()
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,8 +38,4 @@ class Migration(migrations.Migration):
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.RunPython(remove_self_connector, reverse),
|
migrations.RunPython(remove_self_connector, reverse),
|
||||||
migrations.RemoveField(
|
|
||||||
model_name="connector",
|
|
||||||
name="local",
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
|
|
17
bookwyrm/migrations/0103_remove_connector_local.py
Normal file
17
bookwyrm/migrations/0103_remove_connector_local.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 3.2.5 on 2021-09-30 18:03
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("bookwyrm", "0102_remove_connector_local"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name="connector",
|
||||||
|
name="local",
|
||||||
|
),
|
||||||
|
]
|
|
@ -233,8 +233,8 @@ urlpatterns = [
|
||||||
name="direct-messages-user",
|
name="direct-messages-user",
|
||||||
),
|
),
|
||||||
# search
|
# search
|
||||||
re_path(r"^search/?$", views.Search.as_view(), name="search"),
|
|
||||||
re_path(r"^search.json/?$", views.Search.as_view(), name="search"),
|
re_path(r"^search.json/?$", views.Search.as_view(), name="search"),
|
||||||
|
re_path(r"^search/?$", views.Search.as_view(), name="search"),
|
||||||
# imports
|
# imports
|
||||||
re_path(r"^import/?$", views.Import.as_view(), name="import"),
|
re_path(r"^import/?$", views.Import.as_view(), name="import"),
|
||||||
re_path(r"^import/(\d+)/?$", views.ImportStatus.as_view(), name="import-status"),
|
re_path(r"^import/(\d+)/?$", views.ImportStatus.as_view(), name="import-status"),
|
||||||
|
|
Loading…
Reference in a new issue