Skip to content

Commit

Permalink
Fix all mysql tables to utf8mb4
Browse files Browse the repository at this point in the history
documentation update
  • Loading branch information
Vítězslav Dvořák committed Dec 17, 2024
1 parent 9df8e85 commit a513284
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
24 changes: 24 additions & 0 deletions db/migrations/20241217144842_my_s_q_lutf_8mb_4.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class MySQLutf8mb4 extends AbstractMigration
{
public function change(): void
{
// Check if the database is MySQL
$databaseType = $this->getAdapter()->getOption('adapter');
if ($databaseType === 'mysql') {
// Apply utf8mb4 character set to the database
$this->execute("ALTER DATABASE `" . $this->getAdapter()->getOption('name') . "` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci");

// Apply utf8mb4 character set to all tables
$tables = $this->fetchAll("SHOW TABLES");
foreach ($tables as $table) {
$tableName = $table[array_keys($table)[0]];
$this->execute("ALTER TABLE `{$tableName}` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci");
}
}
}
}
5 changes: 5 additions & 0 deletions docs/source/apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ The ``environment`` field contains a list of environment variables required by t
- ``defval``: Default value of the variable - you can use {VARIABLE_NAME} to reference other environment variables
- ``required``: Whether the variable is required or not

.. note::

See more about configuration fields on :ref:`configuration` page.


The application icon is svg file stored in the same directory as json application definition. The icon must be named using the application's UUID.

Special variables
Expand Down
12 changes: 6 additions & 6 deletions docs/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Each application in MultiFlexi defines its own configuration fields. This is of
Configuration Fields
--------------------

- Configuration Field Type - one of the following:
- Configuration ``Field Type`` - one of the following:
- **Text**: A single line text input.
- **Number**: A numeric input.
- **Date**: A date input.
Expand All @@ -17,17 +17,17 @@ Configuration Fields
- **Checkbox**: A yes/no checkbox.
- **File**: A file upload input.
- **Directory**: A directory path input.
- Keyword - (capital letters)
- Default Value - (used unless otherwise specified)
- Configuration Field Description
- required yes/no
- ``Keyword`` - The name of configuration field (capital letters)
- ``Default Value`` - (used unless otherwise specified)
- Configuration ``Field Description``
- ``required`` yes/no

.. image:: appconfigfieldseditor.png
:alt: Configuration fields of an application in an editor


JSON Configuration
-----
------------------

To configure the MultiFlexi project, you can also create a configuration file (e.g., `config.yaml`) with the necessary fields. Below is an example configuration file:

3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Welcome to MultiFlexi's documentation!
**MultiFlexi** is an environment that allows you to run various tools on top of AbraFlexi and Stormware Pohoda.
It provides a flexible and customizable platform for integrating and extending the functionality of these software systems.

With MultiFlexi, you can leverage the power of AbraFlexi and Stormware Pohoda to build and automate complex business processes.
With MultiFlexi, you can leverage the power of `AbraFlexi <https://www.abra.eu/flexi/>`_ and `Stormware Pohoda <https://www.stormware.cz/>`_ to build and automate complex business processes.
It offers a wide range of features and capabilities, including data synchronization, workflow automation, reporting, and more.

By utilizing MultiFlexi, you can streamline your business operations, improve efficiency, and enhance collaboration between different systems.
Expand Down Expand Up @@ -43,6 +43,7 @@ Contents
usage
api
application
configuration
company
job
runtemplate
Expand Down

0 comments on commit a513284

Please sign in to comment.