Skip to content

Commit 175b0bb

Browse files
authored
Correct typing for startedAs and virtualAs database column definitions (#50851)
* Correct typing for startedAs and virtualAs database column definitions * Update the typing the use the Expression contract rather than the concrete
1 parent 9e7ba35 commit 175b0bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Database/Schema/ColumnDefinition.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @method $this default(mixed $value) Specify a "default" value for the column
1616
* @method $this first() Place the column "first" in the table (MySQL)
1717
* @method $this from(int $startingValue) Set the starting value of an auto-incrementing field (MySQL / PostgreSQL)
18-
* @method $this generatedAs(string|\Illuminate\Database\Query\Expression $expression = null) Create a SQL compliant identity column (PostgreSQL)
18+
* @method $this generatedAs(string|\Illuminate\Contracts\Database\Query\Expression $expression = null) Create a SQL compliant identity column (PostgreSQL)
1919
* @method $this index(bool|string $indexName = null) Add an index
2020
* @method $this invisible() Specify that the column should be invisible to "SELECT *" (MySQL)
2121
* @method $this nullable(bool $value = true) Allow NULL values to be inserted into the column
@@ -24,13 +24,13 @@
2424
* @method $this fulltext(bool|string $indexName = null) Add a fulltext index
2525
* @method $this spatialIndex(bool|string $indexName = null) Add a spatial index
2626
* @method $this startingValue(int $startingValue) Set the starting value of an auto-incrementing field (MySQL/PostgreSQL)
27-
* @method $this storedAs(string $expression) Create a stored generated column (MySQL/PostgreSQL/SQLite)
27+
* @method $this storedAs(string|\Illuminate\Contracts\Database\Query\Expression $expression) Create a stored generated column (MySQL/PostgreSQL/SQLite)
2828
* @method $this type(string $type) Specify a type for the column
2929
* @method $this unique(bool|string $indexName = null) Add a unique index
3030
* @method $this unsigned() Set the INTEGER column as UNSIGNED (MySQL)
3131
* @method $this useCurrent() Set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value
3232
* @method $this useCurrentOnUpdate() Set the TIMESTAMP column to use CURRENT_TIMESTAMP when updating (MySQL)
33-
* @method $this virtualAs(string $expression) Create a virtual generated column (MySQL/PostgreSQL/SQLite)
33+
* @method $this virtualAs(string|\Illuminate\Contracts\Database\Query\Expression $expression) Create a virtual generated column (MySQL/PostgreSQL/SQLite)
3434
*/
3535
class ColumnDefinition extends Fluent
3636
{

0 commit comments

Comments
 (0)