Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add an upper index on user email (#14931)

Filip Owczarekd81bc988bc73
diff --git a/saleor/account/migrations/0082_auto_20231204_1419.py b/saleor/account/migrations/0082_auto_20231204_1419.py
new file mode 100644
index 0000000000..ee8b7eccea
--- /dev/null
+++ b/saleor/account/migrations/0082_auto_20231204_1419.py
@@ -0,0 +1,22 @@
+# Generated by Django 3.2.22 on 2023-12-04 14:19
+
+from django.db import migrations
+
+CREATE_INDEX = """
+ CREATE INDEX CONCURRENTLY IF NOT EXISTS
+ email_upper_idx ON account_user (upper(email));
+"""
+
+
+class Migration(migrations.Migration):
+ atomic = False
+ dependencies = [
+ ("account", "0081_update_user_is_confirmed"),
+ ]
+
+ operations = [
+ migrations.RunSQL(
+ sql=CREATE_INDEX,
+ reverse_sql="DROP INDEX CONCURRENTLY IF EXISTS email_upper_idx;",
+ ),
+ ]
diff --git a/saleor/account/migrations/0083_merge_20231205_1315.py b/saleor/account/migrations/0083_merge_20231205_1315.py
new file mode 100644
index 0000000000..4e931b5881
--- /dev/null
+++ b/saleor/account/migrations/0083_merge_20231205_1315.py
@@ -0,0 +1,12 @@
+# Generated by Django 3.2.22 on 2023-12-05 13:15
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("account", "0082_auto_20231204_1419"),
+ ("account", "0082_user_last_confirm_email_request"),
+ ]
+
+ operations = []