Skip to content

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

Remove GIN index from product

Jakub Draganekf33cee48909d
diff --git a/saleor/product/migrations/0043_auto_20171207_0839.py b/saleor/product/migrations/0043_auto_20171207_0839.py
new file mode 100644
index 0000000000..55bf9dc2da
--- /dev/null
+++ b/saleor/product/migrations/0043_auto_20171207_0839.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.5 on 2017-12-07 14:39
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('product', '0042_auto_20171206_0501'),
+ ]
+
+ operations = [
+ migrations.RemoveIndex(
+ model_name='product',
+ name='product_pro_name_5bb6fa_gin',
+ ),
+ ]
diff --git a/saleor/product/models.py b/saleor/product/models.py
index 5d0b2211d0..6a4460dbab 100644
--- a/saleor/product/models.py
+++ b/saleor/product/models.py
@@ -5,7 +5,6 @@ from decimal import Decimal
from django.conf import settings
from django.contrib.postgres.fields import HStoreField
-from django.contrib.postgres.indexes import GinIndex
from django.core.validators import MinValueValidator, RegexValidator
from django.db import models
from django.db.models import F, Max, Q
@@ -141,7 +140,6 @@ class Product(models.Model, ItemRange):
class Meta:
app_label = 'product'
- indexes = [GinIndex(fields=['name', 'description'])]
permissions = (
('view_product',
pgettext_lazy('Permission description', 'Can view products')),