New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add binary, set and other missing data types to typeMap list in Mysql Schema #19705
Comments
Sounds alright. Would you please do a pull requests so we have a test runs to verify it doesn't break anything covered? |
This issue also stands for set data type in Mysql. Though its corresponding PHP side should be array I think. So possibly implementation for 'set' in Yii should be more work than just adding it to |
There are also other data type missing. I will put that in main issue description. |
What should be corresponding abstract data type for spatial data type such as geometry, point etc? |
I think we should not add spatial types. |
We should not add too specific types since the whole idea of DB/AR was to have a commong ground between MySQL, PostgreSQL etc. |
|
Most of these non-spatial types are only aliases that can be used while creating/altering column, they're not real MySQL types. |
The purpose of adding these data type is that I am building a library on the top of Yii 2. In that lib I allow lib user to put a real DB type. And to validate it I use |
@SOHELAHMED7 you may use uppercase. For example: $this->addColumn('table', 'column', 'BINARY(16)'); |
As
binary
is the real data type in Mysql, it would be more perfect to add it to$typeMap
list of\yii\db\mysql\Schema::class
My proposal:
'enum' => self::TYPE_STRING, 'varbinary' => self::TYPE_BINARY, + 'binary' => self::TYPE_BINARY, 'json' => self::TYPE_JSON,
List of missing data types
For
set
#19705 (comment)
Loosely related to #18409
The text was updated successfully, but these errors were encountered: