Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update doc of ColumnBuilder::text() #910

Merged
merged 2 commits into from
Dec 23, 2024
Merged
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
14 changes: 14 additions & 0 deletions src/Schema/Column/ColumnBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ public static function string(int|null $size = 255): ColumnSchemaInterface

/**
* Builds a column with the abstract type `text`.
*
* @param int|null $size The maximum length of the column or `null` if it is not limited.
*
* MySQL creates the column as the smallest `TEXT` type large enough to hold values of `$size` characters.
* This corresponds to `TINYTEXT`, `MEDIUMTEXT`, `TEXT`, and `LONGTEXT` column types and depends on the character
* set used.
*
* For example, the maximum sizes in different character sets are as follows:
* | Column type | latin1 | utf8 | utf8mb4
* |-------------|---------------|---------------|----------------
* | TINYTEXT | 255 | 85 | 63
* | TEXT | 65,535 | 21,845 | 16,383
* | MEDIUMTEXT | 16,777,215 | 5,592,405 | 4,194,303
* | LONGTEXT | 4,294,967,295 | 4,294,967,295 | 4,294,967,295
*/
public static function text(int|null $size = null): ColumnSchemaInterface
{
Expand Down
Loading