diff --git a/docs/configuration/command_line_interface.rst b/docs/configuration/command_line_interface.rst index a211762f..2a5084c8 100644 --- a/docs/configuration/command_line_interface.rst +++ b/docs/configuration/command_line_interface.rst @@ -116,6 +116,9 @@ These are the commands you may need to use in relation to your Mautic instance. * - ``messenger:consume email`` - Processes mail queue - + * - ``mautic:fields:analse`` + - Analyze Custom Fields table and return table or file with results. See :doc:`/contacts/custom_fields`. + - * - ``mautic:import`` - If the CSV import is configured to run in background then this command will pick up the pending import jobs and imports the data from CSV files to Mautic. - diff --git a/docs/contacts/custom_fields.rst b/docs/contacts/custom_fields.rst index 86d2d6d9..dd7c55a8 100644 --- a/docs/contacts/custom_fields.rst +++ b/docs/contacts/custom_fields.rst @@ -106,6 +106,28 @@ This configuration helps prevent **http** request timeouts because it handles th To mitigate the table lock issue, run the command only once daily when you know that most of your audience is offline. With less traffic going into Mautic, the chances of encountering a problem are lower. + +Analyzing Custom Fields to optimize tables +****************************************** + +Since Mautic 5.1 there is a command which allows you to analyze the Custom Fields and optimize the tables. This command is useful when you have a lot of Custom Fields and you want to optimize the size of VARCHAR fields. + +Using this command allows you to optimize the VARCHAR columns so that you can create more Custom Fields if you hit the hard limit on the Leads table and can't create more. + +Use the command: + +.. code-block:: bash + + bin/console mautic:fields:analyse -t + +Use the -t argument to see the output in tabulated form in the console. + +Use the following to export the data to a file: + +.. code-block:: bash + + bin/console mautic:fields:analyse > path/to/file.csv + Locally defined countries and regions ************************************* @@ -129,4 +151,5 @@ Since Mautic 5.1 it's possible to define custom countries and regions via locall "Castle Whitespire", "Ember's Tomb" ] - } \ No newline at end of file + } +