From 550960e7f212aca61f884faeeba2c50881464954 Mon Sep 17 00:00:00 2001 From: stuppie Date: Mon, 26 Oct 2026 12:33:22 -0600 Subject: add migrations (with concurrent index creation) --- ...thluser_last_offerwall_requested_at_and_more.py | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 generalresearch/thl_django/migrations/0015_thluser_last_offerwall_requested_at_and_more.py diff --git a/generalresearch/thl_django/migrations/0015_thluser_last_offerwall_requested_at_and_more.py b/generalresearch/thl_django/migrations/0015_thluser_last_offerwall_requested_at_and_more.py new file mode 100644 index 0000000..fca705e --- /dev/null +++ b/generalresearch/thl_django/migrations/0015_thluser_last_offerwall_requested_at_and_more.py @@ -0,0 +1,46 @@ +# Generated by Django 6.1.1 on 2026-10-26 18:30 + +from django.db import migrations, models +from django.contrib.postgres.operations import AddIndexConcurrently + + +class Migration(migrations.Migration): + atomic = False + + dependencies = [ + ('thl_django', '0014_brokerageproduct_user_count_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='thluser', + name='last_offerwall_requested_at', + field=models.DateTimeField(null=True), + ), + migrations.AddField( + model_name='thluser', + name='last_profiling_submission_at', + field=models.DateTimeField(null=True), + ), + migrations.AddField( + model_name='thluser', + name='last_task_completed_at', + field=models.DateTimeField(null=True), + ), + AddIndexConcurrently( + model_name='thluser', + index=models.Index(fields=['product_id', '-last_seen'], name='thl_user_product_ceb8d3_idx'), + ), + AddIndexConcurrently( + model_name='thluser', + index=models.Index(condition=models.Q(('last_task_completed_at__isnull', False)), fields=['last_task_completed_at'], name='thl_user_last_task_comp_nn'), + ), + AddIndexConcurrently( + model_name='thluser', + index=models.Index(condition=models.Q(('last_offerwall_requested_at__isnull', False)), fields=['last_offerwall_requested_at'], name='thl_user_last_offerwall_nn'), + ), + AddIndexConcurrently( + model_name='thluser', + index=models.Index(condition=models.Q(('last_profiling_submission_at__isnull', False)), fields=['last_profiling_submission_at'], name='thl_user_last_profile_nn'), + ), + ] -- cgit v1.2.3