ColumnDefinition.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Illuminate\Database\Schema;
  3. use Illuminate\Support\Fluent;
  4. /**
  5. * @method $this after(string $column) Place the column "after" another column (MySQL)
  6. * @method $this always(bool $value = true) Used as a modifier for generatedAs() (PostgreSQL)
  7. * @method $this autoIncrement() Set INTEGER columns as auto-increment (primary key)
  8. * @method $this change() Change the column
  9. * @method $this charset(string $charset) Specify a character set for the column (MySQL)
  10. * @method $this collation(string $collation) Specify a collation for the column
  11. * @method $this comment(string $comment) Add a comment to the column (MySQL/PostgreSQL)
  12. * @method $this default(mixed $value) Specify a "default" value for the column
  13. * @method $this first() Place the column "first" in the table (MySQL)
  14. * @method $this from(int $startingValue) Set the starting value of an auto-incrementing field (MySQL / PostgreSQL)
  15. * @method $this generatedAs(string|\Illuminate\Contracts\Database\Query\Expression $expression = null) Create a SQL compliant identity column (PostgreSQL)
  16. * @method $this index(bool|string $indexName = null) Add an index
  17. * @method $this invisible() Specify that the column should be invisible to "SELECT *" (MySQL)
  18. * @method $this nullable(bool $value = true) Allow NULL values to be inserted into the column
  19. * @method $this persisted() Mark the computed generated column as persistent (SQL Server)
  20. * @method $this primary(bool $value = true) Add a primary index
  21. * @method $this fulltext(bool|string $indexName = null) Add a fulltext index
  22. * @method $this spatialIndex(bool|string $indexName = null) Add a spatial index
  23. * @method $this startingValue(int $startingValue) Set the starting value of an auto-incrementing field (MySQL/PostgreSQL)
  24. * @method $this storedAs(string|\Illuminate\Contracts\Database\Query\Expression $expression) Create a stored generated column (MySQL/PostgreSQL/SQLite)
  25. * @method $this type(string $type) Specify a type for the column
  26. * @method $this unique(bool|string $indexName = null) Add a unique index
  27. * @method $this unsigned() Set the INTEGER column as UNSIGNED (MySQL)
  28. * @method $this useCurrent() Set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value
  29. * @method $this useCurrentOnUpdate() Set the TIMESTAMP column to use CURRENT_TIMESTAMP when updating (MySQL)
  30. * @method $this virtualAs(string|\Illuminate\Contracts\Database\Query\Expression $expression) Create a virtual generated column (MySQL/PostgreSQL/SQLite)
  31. */
  32. class ColumnDefinition extends Fluent
  33. {
  34. //
  35. }