MariaDB is diverging more and more from MySQL.
Try to use JSON columns with Yii and MariaDB.
It should work.
It doesn't since MySQL and MariaDB have solved the problem in different ways.
mariadb\Schema and related classes that extend from the MySQL version.JSON column we must manually add the JSON validation constraint, see this.Since in MariaDB creating a JSON column results in a LONGTEXT column we need to somehow identify which LONGTEXT columns contain JSON.
JSON columns in MariaDB via column comments or name pattern matching.JSON column by parsing constraints via SHOW CREATE TABLE.Since the DSN remains exactly the same. No one will ever use the MariaDB schema / classes, so any additions to Yii are backwards compatible.
For now I propose not doing any detection and just forcing users to set $driverName = 'mariadb'; if they want to use the new classes.
I'm willing to implement this in 2.X, alternatively I'll implement this privately and will merge it into 3.0 when that gets released.
Any feedback is appreciated.
I think the best way is if you'll implement it as extension as we do for 3.0 for MSSQL and Oracle: https://github.com/yiisoft/yii2-oracle
Ah, nice, so for 3.0 all drivers are separate?
I'll implement an extension for both 2.x and 3.x then i guess :)
Not all drivers but the ones core team aren't able to maintain themselves.
When you'll do, feel free to send pull requests that add these to the guide.
See my comment in #16515, MariaDB should be offically supported.
For 2.0 this can be an extension, we should officiall support mariadb features in 3.0.
This issue was moved by samdark to yiisoft/db#8.
Most helpful comment
For 2.0 this can be an extension, we should officiall support mariadb features in 3.0.