This repository was archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Fix for #100 - timestamp migrations do not work in MariaDB #112
Merged
cebe
merged 96 commits into
cebe:master
from
SOHELAHMED7:100-timestamp-migrations-do-not-work-in-mariadb
Dec 30, 2022
Merged
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
7babecd
Fix-xDbType
siggi-k a934859
Fix-Nullable (#99)
siggi-k 5870b24
Update README.md
cebe 7754878
Fix-Enum on MariaDb
siggi-k 304cf15
Merge branch 'fix-db-schema' of github.com:siggi-k/yii2-openapi into …
siggi-k 6ae03fb
Fix-numeric (mariaDb)
siggi-k b92a2ab
test
SOHELAHMED7 2a7e053
Undo test
SOHELAHMED7 f12b01c
test
SOHELAHMED7 d177ed9
Undo test
SOHELAHMED7 314743e
test2
SOHELAHMED7 3184ae0
Merge branch '100-timestamp-migrations-do-not-work-in-mariadb' of git…
SOHELAHMED7 2af51fb
Undo test2
SOHELAHMED7 96b91b1
Simplify condition
SOHELAHMED7 2697fe8
Update fixture
SOHELAHMED7 73fd187
Enhancements
SOHELAHMED7 0fda678
Fix failing tests
SOHELAHMED7 540e9ff
Fix style
SOHELAHMED7 c9aeee7
test
SOHELAHMED7 fdfe048
undo test
SOHELAHMED7 3740d5b
Add composer package sam-it/yii2-mariadb
SOHELAHMED7 4a313cc
Remove enum as there is not enum physical type in \yii\db\pgsql\Schema
SOHELAHMED7 e0b8e00
Fix error in tests: Remove enum as there is not enum physical type in…
SOHELAHMED7 1b9f568
Fix errors in tests, fix fixtures, fix mariadb docker image; fix mari…
SOHELAHMED7 8fb7084
test
SOHELAHMED7 329866e
undo test
SOHELAHMED7 58e5772
Merge branches 'master' and '100-timestamp-migrations-do-not-work-in-…
SOHELAHMED7 4654195
Remove 'without UUID' test case
SOHELAHMED7 da85359
Remove 'without UUID' test case part 2
SOHELAHMED7 0b94b2a
Add TODO note [skip ci]
SOHELAHMED7 99433e1
Remove UUID in tests [skip ci]
SOHELAHMED7 ee5136c
Convert erroneous tests to failed tests
SOHELAHMED7 b667ac0
Use real app and real DB everywhere
SOHELAHMED7 930e39e
Edit GA to Run tests in Docker container in Github action
SOHELAHMED7 5a3395c
Change vendor of install-docker-compose in GA
SOHELAHMED7 bf0c9a7
Config GA - WIP
SOHELAHMED7 1924510
Config GA -part 2 - WIP
SOHELAHMED7 b4ec082
Config GA -part 3 - WIP
SOHELAHMED7 95dee95
Config GA -part 4 - WIP
SOHELAHMED7 a705c84
Config GA -part 5 - WIP
SOHELAHMED7 e9dea60
Config GA -part 6 - WIP
SOHELAHMED7 bfa65e2
Config GA -part 7 - WIP
SOHELAHMED7 17781a8
Fix failing tests and add more tests for Pgsql and Mariadb
SOHELAHMED7 e4e2488
Fix failing tests and bugs
SOHELAHMED7 a753d91
Fix enum related bug in failing tests - WIP
SOHELAHMED7 64b6936
WIP
SOHELAHMED7 6adae6a
Remove all enum related changes
SOHELAHMED7 015a1fc
Add TODO in Makefile
SOHELAHMED7 0a79006
Fix failing tests
SOHELAHMED7 68718e0
Attempt to fix failing tests in GA
SOHELAHMED7 f2cacfe
Error message betterment
SOHELAHMED7 4868df0
last commit ('Error message betterment') didn't seen in Github, check…
SOHELAHMED7 b32ae65
BLOB, TEXT, GEOMETRY, and JSON data types cannot be assigned a defaul…
SOHELAHMED7 a3929f0
Fix failing tests caused by x-db-type implementation and running test…
SOHELAHMED7 54da89a
Cleanup
SOHELAHMED7 1516dd6
Cleanup 2
SOHELAHMED7 e8ae746
Fix bug in x-db-type feature + Add tests WIP
SOHELAHMED7 dbe2ba5
Fix failing test
SOHELAHMED7 22e3ace
Restructure base DbTestCase and organize tests
SOHELAHMED7 2f010bf
Add tests for x-db-type for MySQL, MariaDb and PgSQL for cases: fresh…
SOHELAHMED7 df929e0
Fix failing tests + add change column data type by x-db-type - WIP
SOHELAHMED7 15b1b68
Trigger Github Action
SOHELAHMED7 8feea61
Trigger Github Action 2
SOHELAHMED7 3085986
Trigger Github Action 3
SOHELAHMED7 9953ede
Trigger Github Action 4
SOHELAHMED7 632dcb8
Enh Github Action
SOHELAHMED7 44af514
Fix issue and failing test in implementation of x-db-type
SOHELAHMED7 109e46d
Enhance tests + organize code
SOHELAHMED7 5cc77ea
Change PropertySchema
SOHELAHMED7 fec8a0b
Consider phpType in comparison
SOHELAHMED7 c3c5367
Strengthen the way tmp column is stored for compareColumn part + fix …
SOHELAHMED7 7928ef0
Fix style + Implement Pgsql compare column change by new way
SOHELAHMED7 ac42564
Fix bugs in Decimal related x-db-type changes
SOHELAHMED7 6e2275d
Refactor migration generation code and add more tests for x-db-type f…
SOHELAHMED7 fb869ba
Add more tests for x-db-type for MySQL
SOHELAHMED7 dd0ce9b
Add more tests
SOHELAHMED7 2180f7a
Add more tests for edit column scenario
SOHELAHMED7 6a3e1da
Pass the CI
SOHELAHMED7 30671aa
Add tests for Mariadb + add tooling support to run migrations for mul…
SOHELAHMED7 d5d0f6f
Fix bug related to DB type with more than one word for MySQL and PgSQ…
SOHELAHMED7 02d06fa
Tests refactoring and add more x-db-type tests for PgSQL
SOHELAHMED7 4fb7b28
WIP
SOHELAHMED7 8449d44
Implement string base add column code - WIP ('double precision precis…
SOHELAHMED7 2baf6c5
Fix 'double precision precision' issue for x-db-type - WIP + Fix few …
SOHELAHMED7 3ac7837
Fix failing tests
SOHELAHMED7 7df1b85
Delete un-necessary file
SOHELAHMED7 b1cf636
Change addColumn feature in migration for x-db-type
SOHELAHMED7 8d19fe9
Fix issue for alter column for x-db-type in Pgsql
SOHELAHMED7 7f64da0
Fix style
SOHELAHMED7 477c38b
Fix tests for fresh tables scenario
SOHELAHMED7 0070b63
Enhance PR
SOHELAHMED7 595f25f
Add more tests
SOHELAHMED7 cbd1dc1
Enhance PR
SOHELAHMED7 a49eee1
Fix bugs + add more tests
SOHELAHMED7 984382f
Add docs
SOHELAHMED7 a00a8da
Fix failing test
SOHELAHMED7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (c) 2018 Carsten Brandt <mail@cebe.cc> and contributors | ||
* @license https://github.com/cebe/yii2-openapi/blob/master/LICENSE | ||
*/ | ||
|
||
namespace cebe\yii2openapi\db; | ||
|
||
class ColumnSchema extends \yii\db\ColumnSchema | ||
{ | ||
/** | ||
* @var string|null|false | ||
* Custom DB type which contains real DB type | ||
* Contains x-db-type string if present in OpenAPI YAML/json file | ||
* @see \cebe\yii2openapi\lib\items\Attribute::$xDbType and `x-db-type` docs in README.md | ||
* Used to detect what kind of migration code for column is to be generated | ||
* e.g. `double_p double precision NULL DEFAULT NULL` | ||
* instead of | ||
* ```php | ||
* $this->createTable('{{%alldbdatatypes}}', [ | ||
* ... | ||
* 'double_p' => 'double precision NULL DEFAULT NULL', | ||
* ... | ||
* ``` | ||
*/ | ||
public $xDbType; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.