Skip to content

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

Fix migrations

Mateusz Grzyb90fc34adfb08
diff --git a/saleor/payment/migrations/0030_auto_20210823_1702.py b/saleor/payment/migrations/0030_auto_20210823_1702.py
deleted file mode 100644
index 5f0b413925..0000000000
--- a/saleor/payment/migrations/0030_auto_20210823_1702.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Generated by Django 3.2.5 on 2021-08-23 17:02
-
-from django.db import migrations, models
-
-import saleor.core.utils.json_serializer
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("payment", "0029_alter_payment_options"),
- ]
-
- operations = [
- migrations.AddField(
- model_name="payment",
- name="metadata",
- field=models.JSONField(
- blank=True,
- default=dict,
- encoder=saleor.core.utils.json_serializer.CustomJsonEncoder,
- null=True,
- ),
- ),
- migrations.AddField(
- model_name="payment",
- name="private_metadata",
- field=models.JSONField(
- blank=True,
- default=dict,
- encoder=saleor.core.utils.json_serializer.CustomJsonEncoder,
- null=True,
- ),
- ),
- ]
diff --git a/saleor/payment/migrations/0030_auto_20210823_1058.py b/saleor/payment/migrations/0030_auto_20210825_1338.py
similarity index 71%
rename from saleor/payment/migrations/0030_auto_20210823_1058.py
rename to saleor/payment/migrations/0030_auto_20210825_1338.py
index 537e30f652..b04fa675be 100644
--- a/saleor/payment/migrations/0030_auto_20210823_1058.py
+++ b/saleor/payment/migrations/0030_auto_20210825_1338.py
@@ -1,5 +1,6 @@
-# Generated by Django 3.2.5 on 2021-08-23 10:58
+# Generated by Django 3.2.5 on 2021-08-25 13:38
+import django.contrib.postgres.indexes
from django.db import migrations, models
import saleor.core.utils.json_serializer
@@ -45,4 +46,16 @@ class Migration(migrations.Migration):
max_length=11,
),
),
+ migrations.AddIndex(
+ model_name="payment",
+ index=django.contrib.postgres.indexes.GinIndex(
+ fields=["private_metadata"], name="payment_p_meta_idx"
+ ),
+ ),
+ migrations.AddIndex(
+ model_name="payment",
+ index=django.contrib.postgres.indexes.GinIndex(
+ fields=["metadata"], name="payment_meta_idx"
+ ),
+ ),
]
diff --git a/saleor/payment/migrations/0031_auto_20210824_0952.py b/saleor/payment/migrations/0031_auto_20210824_0952.py
deleted file mode 100644
index 45947d4a9a..0000000000
--- a/saleor/payment/migrations/0031_auto_20210824_0952.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# Generated by Django 3.2.5 on 2021-08-24 09:52
-
-import django.contrib.postgres.indexes
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("payment", "0030_auto_20210823_1702"),
- ]
-
- operations = [
- migrations.AddIndex(
- model_name="payment",
- index=django.contrib.postgres.indexes.GinIndex(
- fields=["private_metadata"], name="payment_p_meta_idx"
- ),
- ),
- migrations.AddIndex(
- model_name="payment",
- index=django.contrib.postgres.indexes.GinIndex(
- fields=["metadata"], name="payment_meta_idx"
- ),
- ),
- ]