diff --git a/server/website/website/migrations/0002_enable_compression.py b/server/website/website/migrations/0002_enable_compression.py index 6bfcafe..8404a39 100644 --- a/server/website/website/migrations/0002_enable_compression.py +++ b/server/website/website/migrations/0002_enable_compression.py @@ -4,6 +4,8 @@ import logging from django.db import migrations, ProgrammingError +from website.settings import MYSQL_COMPRESSION + LOG = logging.getLogger(__name__) TABLES_TO_COMPRESS = [ @@ -70,6 +72,14 @@ class Migration(migrations.Migration): ('website', '0001_initial'), ] - operations = [migrations.RunPython(enable_compression, disable_compression)] - + if MYSQL_COMPRESSION: + operations = [ + migrations.RunPython(enable_compression, + disable_compression) + ] + else: + operations = [ + migrations.RunSQL(migrations.RunSQL.noop, + migrations.RunSQL.noop), + ] diff --git a/server/website/website/settings/credentials_TEMPLATE.py b/server/website/website/settings/credentials_TEMPLATE.py index cc25c90..6277ae3 100644 --- a/server/website/website/settings/credentials_TEMPLATE.py +++ b/server/website/website/settings/credentials_TEMPLATE.py @@ -34,6 +34,13 @@ DATABASES = { } } +# Enables compression on MySQL >= 5.6 on tables: +# - website_backupdata +# - website_knobdata +# - website_metricdata +# - website_pipelinedata +MYSQL_COMPRESSION = False + # ============================================== # DEBUG CONFIGURATION # ==============================================