Skip to content

Commit

Permalink
move towards indexes with fixed names, solving a deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
stitch committed Nov 12, 2024
1 parent bd5f486 commit 2b09401
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.13 on 2024-11-12 07:43

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("internet_nl_dashboard", "0014_uploadlog_percentage"),
]

operations = [
migrations.RenameIndex(
model_name="urllistreport",
new_name="internet_nl_at_when_f55fb9_idx",
old_fields=("at_when", "id"),
),
]
4 changes: 1 addition & 3 deletions dashboard/internet_nl_dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,7 @@ class UrlListReport(SeriesOfUrlsReportMixin): # pylint: disable=too-many-ancest

class Meta:
get_latest_by = "at_when"
index_together = [
["at_when", "id"],
]
indexes = [models.Index(fields=["at_when", "id"])]

def save(self, *args, **kwargs):
# the public share code is a random string string that should be unique and non-guessable
Expand Down
1 change: 1 addition & 0 deletions dashboard/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@

USE_I18N = True

# todo: remove in the migration to django 5.0
USE_L10N = True

USE_TZ = True
Expand Down

0 comments on commit 2b09401

Please sign in to comment.