cancel
Showing results for 
Search instead for 
Did you mean: 

Support for JSON Data Type in MySQL.

0 Kudos

Support for JSON Data Type in MySQL.

When creating tables in Module/Setup/InstallSchema.php I would like "Magento\Framework\DB\Ddl\Table.php" to support the JSON data type as it has its advantages. For DBs that do not have a JSON data type, they can default to text.

 

At the moment I need to add my column manually to enable the usage of the JSON data type.

$sql = <<<EOT
  ALTER TABLE my_table ADD COLUMN column_name JSON NOT NULL
  AFTER a_table_column;
EOT;
$connection->query($sql);