Skip to content

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

clean not used fields from db (#16121)

Krzysztof Waliczeka87780b3ef30
diff --git a/saleor/attribute/migrations/0046_auto_20240611_1143.py b/saleor/attribute/migrations/0046_auto_20240611_1143.py
new file mode 100644
index 0000000000..04e6b4858a
--- /dev/null
+++ b/saleor/attribute/migrations/0046_auto_20240611_1143.py
@@ -0,0 +1,32 @@
+# Generated by Django 3.2.22 on 2024-06-11 11:43
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("attribute", "0045_drop_temporary_fields"),
+ ]
+
+ operations = [
+ migrations.SeparateDatabaseAndState(
+ database_operations=[
+ migrations.RunSQL(
+ """
+ ALTER TABLE attribute_assignedproductattributevalue
+ DROP COLUMN IF EXISTS product_uniq;
+
+ ALTER TABLE attribute_assignedpageattributevalue
+ DROP COLUMN IF EXISTS page_uniq;
+ """,
+ reverse_sql="""
+ ALTER TABLE attribute_assignedpageattributevalue
+ ADD COLUMN page_uniq integer NULL;
+
+ ALTER TABLE attribute_assignedproductattributevalue
+ ADD COLUMN product_uniq integer NULL;
+ """,
+ )
+ ]
+ )
+ ]