Skip to content

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

Drop site order-settings from database (#12239)

Krzysztof Waliczeke283b57f03d8
diff --git a/saleor/site/migrations/0036_remove_order_settings.py b/saleor/site/migrations/0036_remove_order_settings.py
new file mode 100644
index 0000000000..665880b042
--- /dev/null
+++ b/saleor/site/migrations/0036_remove_order_settings.py
@@ -0,0 +1,30 @@
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [("site", "0035_sitesettings_separate_state_remove_order_settings")]
+
+ operations = [
+ migrations.SeparateDatabaseAndState(
+ database_operations=[
+ migrations.RunSQL(
+ sql="""
+ ALTER TABLE site_sitesettings
+ DROP COLUMN
+ automatically_fulfill_non_shippable_gift_card,
+ DROP COLUMN
+ automatically_confirm_all_new_orders;
+ """,
+ reverse_sql="""
+ ALTER TABLE site_sitesettings
+ ADD COLUMN
+ automatically_fulfill_non_shippable_gift_card
+ BOOLEAN,
+ ADD COLUMN
+ automatically_confirm_all_new_orders
+ BOOLEAN;
+ """,
+ )
+ ]
+ )
+ ]