-
Notifications
You must be signed in to change notification settings - Fork 22
Fix for #100 - timestamp migrations do not work in MariaDB #112
Fix for #100 - timestamp migrations do not work in MariaDB #112
Conversation
…hub.com:SOHELAHMED7/yii2-openapi into 100-timestamp-migrations-do-not-work-in-mariadb
… \yii\db\pgsql\Schema
…adb detection WIP
…mariadb' of github.com:SOHELAHMED7/yii2-openapi into 100-timestamp-migrations-do-not-work-in-mariadb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you very much!
I will test this branch in some projects and see if I find any issues with it. If not I'll merge it.
I found a issue that is introduced by this PR. It is 'decimal' in x-db-type is detected as string in models and faker generation. It is being fixed in SOHELAHMED7#2 |
fixed in SOHELAHMED7@3d4d71c Also this introduce some minor changes in models generation 'float' will be now 'double' due to compatibility with gettype function of PHP e.g. - * @property float $amount amount
+ * @property double $amount amount
|
Found a few more things (tested on the
billing_type:
type: string
maxLength: 3
enum:
- CPM
- CPL
- CPO
- CPC results in the following migration (quotes are note escaped): $this->alterColumn('{{%campaigns}}', 'billing_type', 'enum('CPM', 'CPL', 'CPO', 'CPC') NULL DEFAULT NULL'); |
For above comment; fix is already applied. Present in https://github.com/SOHELAHMED7/yii2-openapi/pull/2/files |
Thank you! |
Fix #100
This PR is continued from #103
This PR will:
x-db-type
and will fix bugs related to itdefaultValue()
tests for text, json, blob, geometry for Mysql, Mariadb and Pgsql. In general make default value implementation perfect and add tests for it.enum
andjson
related tests partially or completely to focus on above tasks. It will be added later in their own PR. See For ENUM colums, existing column gets an update which removes the "string type" #111 and json field related errors #109 . This tests are removed to focus on solution for above tasks. Alsoenum
andjson
implementation needs to re-check as it produce errorsSub-tasks
uuid
tests from Mariadb and Mysql as it is only supported in PgSQLdown()
code in migrations forx-db-type
in fresh and secondary code generation of migrationsx-db-type
works perfectly in Mariadb, Mysql and Pgsqltext[]
(inx-db-type
)x-db-type
, timestamp/datetime issue, enum, object issues and these all for all DBs: Pgsql, Mysql, MaridbdefaultValue()
tests for text, json, blob, geometry for Mysql, Mariadb and Pgsqlup()
anddown()
codealterColumn()
enum datatype in yaml issue in Mariadb; also check this issue is reproduced in Mysqlsee For ENUM colums, existing column gets an update which removes the "string type" #111object datatype in yaml issue in Mariadb; also check this issue is reproduced in Mysqlsee json field related errors #109