Skip to content

Commit 0b2c13d

Browse files
authored
Merge pull request #8038 from cakephp/db-features
Add documentation for recent features in 5.3
2 parents 63b3e73 + 3f444ec commit 0b2c13d

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

en/appendices/5-3-migration-guide.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Command
4848
- ``cake plugin assets symlink`` command now supports a ``--relative`` option to
4949
create relative path symlinks. This is useful when creating symlinks within
5050
containers that use volume mounts.
51+
- ``cake server`` now supports a ``--frankenphp`` option that will start the
52+
development server with `FrankenPHP <https://frankenphp.dev/>`__.
5153

5254
Console
5355
-------
@@ -58,9 +60,13 @@ Console
5860
Database
5961
--------
6062

63+
- Added support for Entra authentication to SqlServer driver.
6164
- Added ``Query::optimizerHint()`` which accepts engine-specific optimizer hints.
6265
- Added ``Query::getDriver()`` helper which returns the ``Driver`` for the current connection
6366
role by default.
67+
- Added support for ``year`` column types in MySQL.
68+
- Added support for ``inet``, ``cidr`` and ``macaddr`` network column types to
69+
postgres driver.
6470

6571
Mailer
6672
------

en/orm/database-basics.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ timestampfractional
399399
Maps to the ``TIMESTAMP(N)`` type.
400400
time
401401
Maps to a ``TIME`` type in all databases.
402+
year
403+
Maps to the ``YEAR`` type. Only supported in MySQL.
402404
json
403405
Maps to a ``JSON`` type if it's available, otherwise it maps to ``TEXT``.
404406
enum
@@ -411,6 +413,12 @@ linestring
411413
Maps to a single line in geospatial storage.
412414
polygon
413415
Maps to a single polygon in geospatial storage.
416+
inet
417+
Maps to the ``INET`` type. Only implemented in postgres.
418+
cidr
419+
Maps to the ``CIDR`` type. Only implemented in postgres.
420+
macaddr
421+
Maps to the ``MACADDR`` type. Only implemented in postgres.
414422

415423
These types are used in both the schema reflection features that CakePHP
416424
provides, and schema generation features CakePHP uses when using test fixtures.
@@ -429,6 +437,9 @@ handles, and generate file handles when reading data.
429437
.. versionchanged:: 5.2.0
430438
The ``nativeuuid`` type was added.
431439

440+
.. versionadded:: 5.3.0
441+
The ``inet``, ``cidr``, ``macaddr``, and ``year`` types were added.
442+
432443
.. _datetime-type:
433444

434445
DateTime Type
@@ -1100,7 +1111,7 @@ databases. For example to create a database::
11001111
.. note::
11011112

11021113
When creating a database it is a good idea to set the character set and
1103-
collation parameters (e.g. ``DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci``).
1114+
collation parameters (e.g. ``DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci``).
11041115
If these values are missing, the database will set whatever system default values it uses.
11051116

11061117
.. meta::

en/orm/query-builder.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,20 @@ even on DBMS that does not natively support it::
12831283
.. note::
12841284
Tuple comparison transform only supports the ``IN`` and ``=`` operators
12851285

1286+
Optimizer Hints
1287+
---------------
1288+
1289+
Optimizer hints allow you to control execution plans at the individual query
1290+
level::
1291+
1292+
$query->optimizerHint(['NO_BKA(articles)']);
1293+
1294+
Optimizer hints are currently only supported by MySQL and Postgres (via an
1295+
extension).
1296+
1297+
.. versionadded:: 5.3.0
1298+
``Query::optimizerHint()`` was added.
1299+
12861300
Getting Results
12871301
===============
12881302

0 commit comments

Comments
 (0)