Skip to content

Commit

Permalink
Remove UUID field from pages (#1733)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Oct 22, 2024
1 parent 2e13afe commit e8b0a80
Show file tree
Hide file tree
Showing 9 changed files with 204 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("articles", "0110_alter_articlepage_body_alter_focusedarticlepage_body"),
]

operations = [
migrations.RemoveField(
model_name="articleindexpage",
name="uuid",
),
migrations.RemoveField(
model_name="articlepage",
name="uuid",
),
migrations.RemoveField(
model_name="focusedarticlepage",
name="uuid",
),
migrations.RemoveField(
model_name="recordarticlepage",
name="uuid",
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("blog", "0003_blogpostpage_hero_image_and_more"),
]

operations = [
migrations.RemoveField(
model_name="blogindexpage",
name="uuid",
),
migrations.RemoveField(
model_name="blogpage",
name="uuid",
),
migrations.RemoveField(
model_name="blogpostpage",
name="uuid",
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("collections", "0059_explorerindexpage_twitter_og_description_and_more"),
]

operations = [
migrations.RemoveField(
model_name="explorerindexpage",
name="uuid",
),
migrations.RemoveField(
model_name="highlightgallerypage",
name="uuid",
),
migrations.RemoveField(
model_name="timeperiodexplorerindexpage",
name="uuid",
),
migrations.RemoveField(
model_name="timeperiodexplorerpage",
name="uuid",
),
migrations.RemoveField(
model_name="topicexplorerindexpage",
name="uuid",
),
migrations.RemoveField(
model_name="topicexplorerpage",
name="uuid",
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("cookies", "0001_initial"),
]

operations = [
migrations.RemoveField(
model_name="cookiedetailspage",
name="uuid",
),
migrations.RemoveField(
model_name="cookiespage",
name="uuid",
),
]
3 changes: 0 additions & 3 deletions etna/core/models/basepage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import Any, Dict
from uuid import uuid4

from django.conf import settings
from django.db import models
Expand Down Expand Up @@ -70,8 +69,6 @@ class BasePage(AlertMixin, SocialMixin, DataLayerMixin, HeadlessPreviewMixin, Pa
help_text=_("Image that will appear on thumbnails and promos around the site."),
)

uuid = models.UUIDField("UUID", unique=True, default=uuid4, editable=False)

# DataLayerMixin overrides
gtm_content_group = "Page"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("generic_pages", "0037_alter_generalpage_body"),
]

operations = [
migrations.RemoveField(
model_name="generalpage",
name="uuid",
),
migrations.RemoveField(
model_name="hubpage",
name="uuid",
),
]
18 changes: 18 additions & 0 deletions etna/home/migrations/0030_remove_homepage_uuid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("home", "0029_homepage_twitter_og_description_and_more"),
]

operations = [
migrations.RemoveField(
model_name="homepage",
name="uuid",
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("people", "0012_shopitem"),
]

operations = [
migrations.RemoveField(
model_name="peopleindexpage",
name="uuid",
),
migrations.RemoveField(
model_name="personpage",
name="uuid",
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 5.0.8 on 2024-10-22 10:10
# etna:allowRemoveField

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("whatson", "0012_eventpage_twitter_og_description_and_more"),
]

operations = [
migrations.RemoveField(
model_name="eventpage",
name="uuid",
),
migrations.RemoveField(
model_name="exhibitionpage",
name="uuid",
),
migrations.RemoveField(
model_name="whatsonpage",
name="uuid",
),
]

0 comments on commit e8b0a80

Please sign in to comment.