Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/en/orm/database-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,11 @@
date
: Maps to a native `DATE` column type. The return value of this column
type is `Cake\I18n\Date` which emulates the date related
methods of PHP's `DateTime` class.
methods of PHP's `DateTime` class. Supports `CURRENT_DATE` as a default
value that is translated to the driver's dialect. `CURRENT_DATE` will also be
used in relected schema metadata.


Check failure on line 435 in docs/en/orm/database-basics.md

View workflow job for this annotation

GitHub Actions / validate / Lint Markdown

Multiple consecutive blank lines

docs/en/orm/database-basics.md:435 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md012.md
datetime
: See [Datetime Type](#datetime-type).

Expand All @@ -443,7 +446,9 @@
: Maps to the `TIMESTAMP(N)` type.

time
: Maps to a `TIME` type in all databases.
: Maps to a `TIME` type in all databases. Supports `CURRENT_TIME` as a default
value that is translated to the driver's dialect. `CURRENT_TIME` will also be
used in relected schema metadata.

year
: Maps to the `YEAR` type. Only supported in MySQL.
Expand Down Expand Up @@ -540,6 +545,10 @@
TypeFactory::map('datetime', DateTimeTimezoneType::class);
```

Datetime types support a schema default of `CURRENT_TIMESTAMP` to represent the
current timestamp. This value can be used in migrations, and will be present in
reflected schema metadata.

### Enum Type

`class` Cake\\Database\\**EnumType**
Expand Down
Loading