File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,22 @@ SECURITY
1919BREAKING
2020********
2121
22+ Behavior Changes
23+ ================
24+
25+ Forge::modifyColumn()
26+ ---------------------
27+
28+ - The :ref: `$forge->modifyColumn() <db-forge-modifyColumn >` has been fixed. Due
29+ to a bug, in previous versions, SQLite3/Postgres/SQLSRV might change
30+ ``NULL ``/``NOT NULL `` unpredictably.
31+ - In previous versions, the OCI8 driver did not change ``NULL ``/``NOT NULL ``
32+ when you don't specify ``null `` value.
33+ - Now in all database drivers ``$forge->modifyColumn() `` always sets ``NULL ``
34+ when you don't specify ``null `` value.
35+ - The ``NULL ``/``NOT NULL `` change may still be unexpectedly, it is recommended
36+ to always specifiy ``null `` value.
37+
2238Message Changes
2339***************
2440
Original file line number Diff line number Diff line change @@ -285,6 +285,8 @@ Used to remove multiple columns from a table.
285285Modifying a Field in a Table
286286============================
287287
288+ .. _db-forge-modifyColumn :
289+
288290$forge->modifyColumn()
289291----------------------
290292
@@ -295,7 +297,9 @@ change the name, you can add a "name" key into the field defining array.
295297.. literalinclude :: forge/026.php
296298
297299.. note :: The ``modifyColumn()`` may unexpectedly change ``NULL``/``NOT NULL``.
298- So it is recommended to always specify ``null `` value.
300+ So it is recommended to always specify ``null `` value. Unlike when creating
301+ a table, if ``null `` is not specified, the column will be ``NULL ``, not
302+ ``NOT NULL ``.
299303
300304.. note :: Due to a bug, prior v4.3.3, SQLite3 may not set ``NOT NULL`` even if you
301305 specify ``'null' => false ``.
You can’t perform that action at this time.
0 commit comments