-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🗃️ [#4920] Squash analytics_tools migrations
Squashed all migrations into a single operation. Requires 2.8.0 to have been run (which is enforced by the upgrade checks). Once 3.0 is released, the original migrations can be removed.
- Loading branch information
1 parent
b9b8ae7
commit 693d3aa
Showing
1 changed file
with
367 additions
and
0 deletions.
There are no files selected for viewing
367 changes: 367 additions & 0 deletions
367
src/openforms/analytics_tools/migrations/0001_initial_to_v300.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,367 @@ | ||
# Generated by Django 4.2.17 on 2024-12-27 13:03 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
import openforms.analytics_tools.validators | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
replaces = [ | ||
("analytics_tools", "0001_initial"), | ||
("analytics_tools", "0002_auto_20230119_1500"), | ||
("analytics_tools", "0003_cspsetting_identifier"), | ||
( | ||
"analytics_tools", | ||
"0004_analyticstoolsconfiguration_enable_piwik_pro_tag_manager", | ||
), | ||
("analytics_tools", "0005_auto_20231206_1202"), | ||
("analytics_tools", "0006_auto_20240112_1046"), | ||
( | ||
"analytics_tools", | ||
"0007_alter_analyticstoolsconfiguration_analytics_cookie_consent_group", | ||
), | ||
( | ||
"analytics_tools", | ||
"0008_analyticstoolsconfiguration_govmetric_secure_guid_form_abort_and_more", | ||
), | ||
("analytics_tools", "0009_convert_ids_govmetric"), | ||
( | ||
"analytics_tools", | ||
"0010_remove_analyticstoolsconfiguration_govmetric_secure_guid_and_more", | ||
), | ||
( | ||
"analytics_tools", | ||
"0011_analyticstoolsconfiguration_enable_expoints_analytics_and_more", | ||
), | ||
] | ||
|
||
dependencies = [ | ||
("cookie_consent", "0002_auto__add_logitem"), | ||
("config", "0001_initial_to_v250"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="AnalyticsToolsConfiguration", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"gtm_code", | ||
models.CharField( | ||
blank=True, | ||
help_text="Typically looks like 'GTM-XXXX'. Supplying this installs Google Tag Manager.", | ||
max_length=50, | ||
verbose_name="Google Tag Manager code", | ||
), | ||
), | ||
( | ||
"ga_code", | ||
models.CharField( | ||
blank=True, | ||
help_text="Typically looks like 'UA-XXXXX-Y'. Supplying this installs Google Analytics.", | ||
max_length=50, | ||
verbose_name="Google Analytics code", | ||
), | ||
), | ||
( | ||
"enable_google_analytics", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Enabling this installs Google Analytics", | ||
verbose_name="enable google analytics", | ||
), | ||
), | ||
( | ||
"matomo_url", | ||
models.URLField( | ||
blank=True, | ||
help_text="The base URL of your Matomo server, e.g. 'https://matomo.example.com'.", | ||
max_length=255, | ||
validators=[ | ||
openforms.analytics_tools.validators.validate_no_trailing_slash | ||
], | ||
verbose_name="Matomo server URL", | ||
), | ||
), | ||
( | ||
"matomo_site_id", | ||
models.PositiveIntegerField( | ||
blank=True, | ||
help_text="The 'idsite' of the website you're tracking in Matomo.", | ||
null=True, | ||
verbose_name="Matomo site ID", | ||
), | ||
), | ||
( | ||
"enable_matomo_site_analytics", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Enabling this installs Matomo", | ||
verbose_name="enable matomo site analytics", | ||
), | ||
), | ||
( | ||
"piwik_url", | ||
models.URLField( | ||
blank=True, | ||
help_text="The base URL of your Piwik server, e.g. 'https://piwik.example.com'.", | ||
max_length=255, | ||
validators=[ | ||
openforms.analytics_tools.validators.validate_no_trailing_slash | ||
], | ||
verbose_name="Piwik server URL", | ||
), | ||
), | ||
( | ||
"piwik_site_id", | ||
models.PositiveIntegerField( | ||
blank=True, | ||
help_text="The 'idsite' of the website you're tracking in Piwik.", | ||
null=True, | ||
verbose_name="Piwik site ID", | ||
), | ||
), | ||
( | ||
"enable_piwik_site_analytics", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Enabling this installs Piwik", | ||
verbose_name="enable piwik site analytics", | ||
), | ||
), | ||
( | ||
"piwik_pro_url", | ||
models.URLField( | ||
blank=True, | ||
help_text="The base URL of your Piwik PRO server, e.g. 'https://your-instance-name.piwik.pro'.", | ||
max_length=255, | ||
validators=[ | ||
openforms.analytics_tools.validators.validate_no_trailing_slash | ||
], | ||
verbose_name="Piwik PRO server URL", | ||
), | ||
), | ||
( | ||
"piwik_pro_site_id", | ||
models.UUIDField( | ||
blank=True, | ||
help_text="The 'idsite' of the website you're tracking in Piwik PRO. https://help.piwik.pro/support/questions/find-website-id/", | ||
null=True, | ||
verbose_name="Piwik PRO site ID", | ||
), | ||
), | ||
( | ||
"enable_piwik_pro_site_analytics", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Enabling this installs Piwik PRO Analytics", | ||
verbose_name="enable Piwik PRO Site Analytics", | ||
), | ||
), | ||
( | ||
"siteimprove_id", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your SiteImprove ID - you can find this from the embed snippet example, which should contain a URL like '//siteimproveanalytics.com/js/siteanalyze_XXXXX.js'. The XXXXX is your ID.", | ||
max_length=10, | ||
verbose_name="SiteImprove ID", | ||
), | ||
), | ||
( | ||
"enable_siteimprove_analytics", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Enabling this installs SiteImprove", | ||
verbose_name="enable siteImprove analytics", | ||
), | ||
), | ||
( | ||
"analytics_cookie_consent_group", | ||
models.ForeignKey( | ||
help_text="The cookie group used for analytical cookies. The analytics scripts are loaded only if this cookie group is accepted by the end-user.", | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="cookie_consent.cookiegroup", | ||
), | ||
), | ||
( | ||
"enable_piwik_pro_tag_manager", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Enabling this installs Piwik PRO Tag Manager.", | ||
verbose_name="enable piwik Pro Tag Manager", | ||
), | ||
), | ||
( | ||
"enable_govmetric_analytics", | ||
models.BooleanField( | ||
default=False, | ||
help_text="This enables GovMetric to collect data while a user fills in a form and it adds a button at the end of a form to fill in a client satisfaction survey.", | ||
verbose_name="enable GovMetric analytics", | ||
), | ||
), | ||
( | ||
"govmetric_secure_guid_form_aborted", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric secure GUID for when a form is aborted - This is an optional value. It is created by KLANTINFOCUS when a list of questions is created. It is a string that is unique per set of questions.", | ||
max_length=50, | ||
verbose_name="GovMetric secure GUID form aborted", | ||
), | ||
), | ||
( | ||
"govmetric_secure_guid_form_finished", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric secure GUID for when a form is finished - This is an optional value. It is created by KLANTINFOCUS when a list of questions is created. It is a string that is unique per set of questions.", | ||
max_length=50, | ||
verbose_name="GovMetric secure GUID form finished", | ||
), | ||
), | ||
( | ||
"govmetric_source_id_form_aborted", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric source ID for when a form is aborted - This is created by KLANTINFOCUS when a list of questions is created. It is a numerical value that is unique per set of questions.", | ||
max_length=10, | ||
verbose_name="GovMetric source ID form aborted", | ||
), | ||
), | ||
( | ||
"govmetric_source_id_form_finished", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric source ID for when a form is finished - This is created by KLANTINFOCUS when a list of questions is created. It is a numerical value that is unique per set of questions.", | ||
max_length=10, | ||
verbose_name="GovMetric source ID form finished", | ||
), | ||
), | ||
( | ||
"govmetric_secure_guid_form_aborted_en", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric secure GUID for when a form is aborted - This is an optional value. It is created by KLANTINFOCUS when a list of questions is created. It is a string that is unique per set of questions.", | ||
max_length=50, | ||
null=True, | ||
verbose_name="GovMetric secure GUID form aborted", | ||
), | ||
), | ||
( | ||
"govmetric_secure_guid_form_aborted_nl", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric secure GUID for when a form is aborted - This is an optional value. It is created by KLANTINFOCUS when a list of questions is created. It is a string that is unique per set of questions.", | ||
max_length=50, | ||
null=True, | ||
verbose_name="GovMetric secure GUID form aborted", | ||
), | ||
), | ||
( | ||
"govmetric_secure_guid_form_finished_en", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric secure GUID for when a form is finished - This is an optional value. It is created by KLANTINFOCUS when a list of questions is created. It is a string that is unique per set of questions.", | ||
max_length=50, | ||
null=True, | ||
verbose_name="GovMetric secure GUID form finished", | ||
), | ||
), | ||
( | ||
"govmetric_secure_guid_form_finished_nl", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric secure GUID for when a form is finished - This is an optional value. It is created by KLANTINFOCUS when a list of questions is created. It is a string that is unique per set of questions.", | ||
max_length=50, | ||
null=True, | ||
verbose_name="GovMetric secure GUID form finished", | ||
), | ||
), | ||
( | ||
"govmetric_source_id_form_aborted_en", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric source ID for when a form is aborted - This is created by KLANTINFOCUS when a list of questions is created. It is a numerical value that is unique per set of questions.", | ||
max_length=10, | ||
null=True, | ||
verbose_name="GovMetric source ID form aborted", | ||
), | ||
), | ||
( | ||
"govmetric_source_id_form_aborted_nl", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric source ID for when a form is aborted - This is created by KLANTINFOCUS when a list of questions is created. It is a numerical value that is unique per set of questions.", | ||
max_length=10, | ||
null=True, | ||
verbose_name="GovMetric source ID form aborted", | ||
), | ||
), | ||
( | ||
"govmetric_source_id_form_finished_en", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric source ID for when a form is finished - This is created by KLANTINFOCUS when a list of questions is created. It is a numerical value that is unique per set of questions.", | ||
max_length=10, | ||
null=True, | ||
verbose_name="GovMetric source ID form finished", | ||
), | ||
), | ||
( | ||
"govmetric_source_id_form_finished_nl", | ||
models.CharField( | ||
blank=True, | ||
help_text="Your GovMetric source ID for when a form is finished - This is created by KLANTINFOCUS when a list of questions is created. It is a numerical value that is unique per set of questions.", | ||
max_length=10, | ||
null=True, | ||
verbose_name="GovMetric source ID form finished", | ||
), | ||
), | ||
( | ||
"enable_expoints_analytics", | ||
models.BooleanField( | ||
default=False, | ||
help_text="This adds a button at the end of a form to fill in a client satisfaction survey using Expoints.", | ||
verbose_name="enable Expoints analytics", | ||
), | ||
), | ||
( | ||
"expoints_config_uuid", | ||
models.CharField( | ||
blank=True, | ||
help_text="The UUID used to retrieve the configuration from Expoints to initialize the client satisfaction survey.", | ||
max_length=50, | ||
verbose_name="Expoints configuration identifier", | ||
), | ||
), | ||
( | ||
"expoints_organization_name", | ||
models.SlugField( | ||
blank=True, | ||
help_text="The name of your organization as registered in Expoints. This is used to construct the URL to communicate with Expoints.", | ||
verbose_name="Expoints organization name", | ||
), | ||
), | ||
( | ||
"expoints_use_test_mode", | ||
models.BooleanField( | ||
default=False, | ||
help_text="Indicates whether or not the test mode should be enabled. If enabled, filled out surveys won't actually be sent, to avoid cluttering Expoints while testing.", | ||
verbose_name="use Expoints test mode", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Analytics tools configuration", | ||
}, | ||
), | ||
] |