Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove sqlite optimizations (#6968)
Krzysztof Wolski8bce02004427
diff --git a/saleor/core/management/commands/populatedb.py b/saleor/core/management/commands/populatedb.pyindex 8d6502bda1..665ffccb44 100644--- a/saleor/core/management/commands/populatedb.py+++ b/saleor/core/management/commands/populatedb.py@@ -53,17 +53,6 @@ class Command(BaseCommand):help="Don't reset SQL sequences that are out of sync.",)- def make_database_faster(self):- """Sacrifice some of the safeguards of sqlite3 for speed.-- Users are not likely to run this command in a production environment.- They are even less likely to run it in production while using sqlite3.- """- if "sqlite3" in connection.settings_dict["ENGINE"]:- cursor = connection.cursor()- cursor.execute("PRAGMA temp_store = MEMORY;")- cursor.execute("PRAGMA synchronous = OFF;")-def sequence_reset(self):"""Run a SQL sequence reset on all saleor.* apps.@@ -88,7 +77,6 @@ class Command(BaseCommand):"saleor.payment.gateways.dummy_credit_card.plugin.""DummyCreditCardGatewayPlugin",]- self.make_database_faster()create_images = not options["withoutimages"]for msg in create_channels():self.stdout.write(msg)diff --git a/saleor/settings.py b/saleor/settings.pyindex 1b6b8c2c7b..2299bf50c3 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -266,6 +266,12 @@ INSTALLED_APPS = []+ENABLE_DJANGO_EXTENSIONS = get_bool_from_env("ENABLE_DJANGO_EXTENSIONS", False)+if ENABLE_DJANGO_EXTENSIONS:+ INSTALLED_APPS += [+ "django_extensions",+ ]+ENABLE_DEBUG_TOOLBAR = get_bool_from_env("ENABLE_DEBUG_TOOLBAR", False)if ENABLE_DEBUG_TOOLBAR:# Ensure the graphiql debug toolbar is actually installed before adding it