We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41ee8b9 commit 881d9a7Copy full SHA for 881d9a7
README.md
@@ -15,23 +15,23 @@ Add the package to your composer.json:
15
16
{
17
"require": {
18
- "bizley/migration": "^3.2"
+ "bizley/migration": "^3.3"
19
}
20
21
22
-and run `composer update` or alternatively run `composer require bizley/migration:^3.2`
+and run `composer update` or alternatively run `composer require bizley/migration:^3.3`
23
24
## Installation for PHP < 7.1
25
26
Add the package to your composer.json:
27
28
29
30
- "bizley/migration": "^2.5"
+ "bizley/migration": "^2.6"
31
32
33
34
-and run `composer update` or alternatively run `composer require bizley/migration:^2.5`
+and run `composer update` or alternatively run `composer require bizley/migration:^2.6`
35
36
## Configuration
37
@@ -151,6 +151,9 @@ default `yii\db\Migration` methods can be recognised (with the exception of `exe
151
`dropCommentFromTable()` methods). Changes made to table's data (like `insert()`, `upsert()`, `delete()`, `truncate()`,
152
etc.) are not tracked.
153
154
+Updating migrations process requires for methods `createTable()`, `addColumn()`, and `alterColumn()` to provide changes
155
+in columns definition in form of an instance of `yii\db\ColumnSchemaBuilder` (like `$this->string()` instead of `'varchar(255)'`).
156
+
157
## Tests
158
159
Tests for MySQL, PostgreSQL, and SQLite are provided. Database configuration is stored in `tests/config.php` (you can override it by
src/table/TableChange.php
@@ -57,7 +57,7 @@ public function getValue()
57
'isUnique' => $schema['isUnique'] ?? null,
58
'isPrimaryKey' => $schema['isPrimaryKey'] ?? null,
59
'check' => $schema['check'] ?? null,
60
- 'default' => $schema['default'],
+ 'default' => $schema['default'] ?? null,
61
'append' => $schema['append'] ?? null,
62
'isUnsigned' => $schema['isUnsigned'] ?? null,
63
'comment' => !empty($schema['comment']) ? $schema['comment'] : null,
@@ -82,7 +82,7 @@ public function getValue()
82
'isUnique' => $this->data[1]['isUnique'] ?? null,
83
'isPrimaryKey' => $this->data[1]['isPrimaryKey'] ?? null,
84
'check' => $this->data[1]['check'] ?? null,
85
- 'default' => $this->data[1]['default'],
+ 'default' => $this->data[1]['default'] ?? null,
86
'append' => $this->data[1]['append'] ?? null,
87
'isUnsigned' => $this->data[1]['isUnsigned'] ?? null,
88
'comment' => !empty($this->data[1]['comment']) ? $this->data[1]['comment'] : null,
src/table/TableColumnJson.php
@@ -16,7 +16,7 @@ class TableColumnJson extends TableColumn
/**
* Checks if default value is JSONed array. If so it's decoded.
- * @since 3.2.1
+ * @since 3.3.0
*/
public function init(): void
0 commit comments