From 08b2c95b295dfb503919652f22a00eac7411ff61 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Wed, 7 Oct 2026 15:02:58 +0200 Subject: [PATCH 1/2] chore: add joint index after SQL issue on toolforge An index was created in production manually. This adds the corresponding migration. The migration should be faked (with `./manage.py migrate --fake`) on instances where it was already created, and applied normally (`./manage.py migrate`) on others. See https://phabricator.wikimedia.org/T438504. --- ...atch_id_alter_tool_id_edit_idx_batch_ts.py | 27 +++++++++++++++++++ store/models.py | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 store/migrations/0024_alter_batch_id_alter_tool_id_edit_idx_batch_ts.py diff --git a/store/migrations/0024_alter_batch_id_alter_tool_id_edit_idx_batch_ts.py b/store/migrations/0024_alter_batch_id_alter_tool_id_edit_idx_batch_ts.py new file mode 100644 index 0000000..d392295 --- /dev/null +++ b/store/migrations/0024_alter_batch_id_alter_tool_id_edit_idx_batch_ts.py @@ -0,0 +1,27 @@ +# Generated by Django 5.1.7 on 2026-10-07 13:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('store', '0023_edits_bigints'), + ] + + operations = [ + migrations.AlterField( + model_name='batch', + name='id', + field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + ), + migrations.AlterField( + model_name='tool', + name='id', + field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + ), + migrations.AddIndex( + model_name='edit', + index=models.Index(fields=['batch', 'timestamp'], name='idx_batch_ts'), + ), + ] diff --git a/store/models.py b/store/models.py index 42d9aa6..2fb8038 100644 --- a/store/models.py +++ b/store/models.py @@ -307,7 +307,8 @@ class Edit(models.Model): class Meta: indexes = [ - models.Index(fields=['batch', 'newrevid']) + models.Index(fields=['batch', 'newrevid']), + models.Index(fields=['batch', 'timestamp'], name='idx_batch_ts') # introduced by https://phabricator.wikimedia.org/T438504 ] reverted_re = re.compile(r'^/\* undo:0\|\|(\d+)\|') From a0b2fee923cfbfee1447500a6c079d87cca62ee0 Mon Sep 17 00:00:00 2001 From: arcstur Date: Thu, 8 Oct 2026 01:22:45 -0300 Subject: [PATCH 2/2] fix: pin social-auth-core max version --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 5fc05ca..d9901ad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ django-extensions==4.1 python-dateutil==2.9.0.post0 pytz==2025.2 git+https://github.com/python-social-auth/social-app-django.git@1225f4fadb5e88f54711cc111931054d5de985c7 +social-auth-core<6.0.0 html5lib==1.1 cached-property==2.0.1 requests-oauthlib==2.0.0