Builder

Illuminate\Database\Schema\Builder

class src/Illuminate/Database/Schema/Builder.php

__construct

v11.0.0 以前から

__construct(Illuminate\Database\Connection $connection)
@param \Illuminate\Database\Connection $connection
  1. v11.0.0 追加
    変更後
    __construct(Illuminate\Database\Connection $connection) [@param \Illuminate\Database\Connection $connection, @return void]
  2. v12.4.0 シグネチャ変更
    変更前
    __construct(Illuminate\Database\Connection $connection) [@param \Illuminate\Database\Connection $connection, @return void]
    変更後
    __construct(Illuminate\Database\Connection $connection) [@param \Illuminate\Database\Connection $connection]

blueprintResolver

v11.0.0 以前から

blueprintResolver(Closure $resolver)
@param \Closure(\Illuminate\Database\Connection, string, \Closure|null): \Illuminate\Database\Schema\Blueprint $resolver
@return void
  1. v11.0.0 追加
    変更後
    blueprintResolver(Closure $resolver) [@param \Closure $resolver, @return void]
  2. v12.12.0 シグネチャ変更
    変更前
    blueprintResolver(Closure $resolver) [@param \Closure $resolver, @return void]
    変更後
    blueprintResolver(?Closure $resolver) [@param TResolver|null $resolver, @return void]
  3. v12.14.0 シグネチャ変更
    変更前
    blueprintResolver(?Closure $resolver) [@param TResolver|null $resolver, @return void]
    変更後
    blueprintResolver(Closure $resolver) [@param \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null $resolver, @return void]
  4. v12.22.0 シグネチャ変更
    変更前
    blueprintResolver(Closure $resolver) [@param \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null $resolver, @return void]
    変更後
    blueprintResolver(Closure $resolver) [@param \Closure(\Illuminate\Database\Connection, string, \Closure|null): \Illuminate\Database\Schema\Blueprint $resolver, @return void]

create

v11.0.0 以前から

create($table, Closure $callback)
@param string $table
@param \Closure $callback
@return void
  1. v11.0.0 追加
    変更後
    create($table, Closure $callback) [@param string $table, @param \Closure $callback, @return void]

createDatabase

v11.0.0 以前から

createDatabase($name)
@param string $name
@return bool
  1. v11.0.0 追加
    変更後
    createDatabase($name) [@param string $name, @return bool]

defaultMorphKeyType

v11.0.0 以前から

static

static defaultMorphKeyType(string $type)
@param string $type
@return void
  1. v11.0.0 追加
    変更後
    static defaultMorphKeyType(string $type) [@param string $type, @return void]

defaultStringLength

v11.0.0 以前から

static

static defaultStringLength($length)
@param non-negative-int $length
@return void
  1. v11.0.0 追加
    変更後
    static defaultStringLength($length) [@param int $length, @return void]
  2. v12.50.0 シグネチャ変更
    変更前
    static defaultStringLength($length) [@param int $length, @return void]
    変更後
    static defaultStringLength($length) [@param non-negative-int $length, @return void]

defaultTimePrecision

v12.0.0 から

static

static defaultTimePrecision(?int $precision): void
  1. v12.0.0 追加
    変更後
    static defaultTimePrecision(?int $precision): void

disableForeignKeyConstraints

v11.0.0 以前から

disableForeignKeyConstraints()
@return bool
  1. v11.0.0 追加
    変更後
    disableForeignKeyConstraints() [@return bool]

drop

v11.0.0 以前から

drop($table)
@param string $table
@return void
  1. v11.0.0 追加
    変更後
    drop($table) [@param string $table, @return void]

dropAllTables

v11.0.0 以前から

dropAllTables()
@return void
  1. v11.0.0 追加
    変更後
    dropAllTables() [@return void]

dropAllTypes

v11.0.0 以前から

dropAllTypes()
@return void
  1. v11.0.0 追加
    変更後
    dropAllTypes() [@return void]

dropAllViews

v11.0.0 以前から

dropAllViews()
@return void
  1. v11.0.0 追加
    変更後
    dropAllViews() [@return void]

dropColumns

v11.0.0 以前から

dropColumns($table, $columns)
@param string $table
@param string|array<string> $columns
@return void
  1. v11.0.0 追加
    変更後
    dropColumns($table, $columns) [@param string $table, @param string|array $columns, @return void]
  2. v12.9.0 シグネチャ変更
    変更前
    dropColumns($table, $columns) [@param string $table, @param string|array $columns, @return void]
    変更後
    dropColumns($table, $columns) [@param string $table, @param string|array<string> $columns, @return void]

dropDatabaseIfExists

v11.0.0 以前から

dropDatabaseIfExists($name)
@param string $name
@return bool
  1. v11.0.0 追加
    変更後
    dropDatabaseIfExists($name) [@param string $name, @return bool]

dropIfExists

v11.0.0 以前から

dropIfExists($table)
@param string $table
@return void
  1. v11.0.0 追加
    変更後
    dropIfExists($table) [@param string $table, @return void]

enableForeignKeyConstraints

v11.0.0 以前から

enableForeignKeyConstraints()
@return bool
  1. v11.0.0 追加
    変更後
    enableForeignKeyConstraints() [@return bool]

ensureExtensionExists

v12.47.0 から

ensureExtensionExists($name, $schema = null)
@param string $name
@param string|null $schema
@return void
  1. v12.47.0 追加
    変更後
    ensureExtensionExists($name, $schema = null) [@param string $name, @param string|null $schema, @return void]

ensureVectorExtensionExists

v12.47.0 から

ensureVectorExtensionExists($schema = null)
@param string|null $schema
@return void
  1. v12.47.0 追加
    変更後
    ensureVectorExtensionExists($schema = null) [@param string|null $schema, @return void]

getColumn

v13.34.0 から

getColumn($table, $column)
@param string $table
@param string $column
@return array{name: string, type: string, type_name: string, collation: string|null, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}
  1. v13.34.0 追加
    変更後
    getColumn($table, $column) [@param string $table, @param string $column, @return array{name: string, type: string, type_name: string, collation: string|null, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}]

getColumnListing

v11.0.0 以前から

getColumnListing($table)
@param string $table
@return list<string>
  1. v11.0.0 追加
    変更後
    getColumnListing($table) [@param string $table, @return array]
  2. v12.9.0 シグネチャ変更
    変更前
    getColumnListing($table) [@param string $table, @return array]
    変更後
    getColumnListing($table) [@param string $table, @return list<string>]

getColumns

v11.0.0 以前から

getColumns($table)
@param string $table
@return list<array{name: string, type: string, type_name: string, collation: string|null, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}>
  1. v11.0.0 追加
    変更後
    getColumns($table) [@param string $table, @return array]
  2. v12.9.0 シグネチャ変更
    変更前
    getColumns($table) [@param string $table, @return array]
    変更後
    getColumns($table) [@param string $table, @return list<array{name: string, type: string, type_name: string, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}>]
  3. v13.8.0 シグネチャ変更
    変更前
    getColumns($table) [@param string $table, @return list<array{name: string, type: string, type_name: string, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}>]
    変更後
    getColumns($table) [@param string $table, @return list<array{name: string, type: string, type_name: string, collation: string|null, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}>]

getColumnType

v11.0.0 以前から

getColumnType($table, $column, $fullDefinition = false)
@param string $table
@param string $column
@param bool $fullDefinition
@return string
  1. v11.0.0 追加
    変更後
    getColumnType($table, $column, $fullDefinition = false) [@param string $table, @param string $column, @param bool $fullDefinition, @return string]

getConnection

v11.0.0 以前から

getConnection()
@return \Illuminate\Database\Connection
  1. v11.0.0 追加
    変更後
    getConnection() [@return \Illuminate\Database\Connection]

getCurrentSchemaListing

v12.0.0 から

getCurrentSchemaListing()
@return string[]|null
  1. v12.0.0 追加
    変更後
    getCurrentSchemaListing() [@return string[]|null]

getCurrentSchemaName

v12.0.0 から

getCurrentSchemaName()
@return string|null
  1. v12.0.0 追加
    変更後
    getCurrentSchemaName() [@return string|null]

getForeignKeys

v11.0.0 以前から

getForeignKeys($table)
@param string $table
@return list<array{name: string|null, columns: list<string>, foreign_schema: string|null, foreign_table: string, foreign_columns: list<string>, on_update: string|null, on_delete: string|null}>
  1. v11.0.0 追加
    変更後
    getForeignKeys($table) [@param string $table, @return array]
  2. v13.7.0 シグネチャ変更
    変更前
    getForeignKeys($table) [@param string $table, @return array]
    変更後
    getForeignKeys($table) [@param string $table, @return list<array{name: string|null, columns: list<string>, foreign_schema: string|null, foreign_table: string, foreign_columns: list<string>, on_update: string|null, on_delete: string|null}>]

getIndexes

v11.0.0 以前から

getIndexes($table)
@param string $table
@return list<array{name: string, columns: list<string>, type: string, unique: bool, primary: bool}>
  1. v11.0.0 追加
    変更後
    getIndexes($table) [@param string $table, @return array]
  2. v12.9.0 シグネチャ変更
    変更前
    getIndexes($table) [@param string $table, @return array]
    変更後
    getIndexes($table) [@param string $table, @return list<array{name: string, columns: list<string>, type: string, unique: bool, primary: bool}>]

getIndexListing

v11.0.0 以前から

getIndexListing($table)
@param string $table
@return list<string>
  1. v11.0.0 追加
    変更後
    getIndexListing($table) [@param string $table, @return array]
  2. v12.9.0 シグネチャ変更
    変更前
    getIndexListing($table) [@param string $table, @return array]
    変更後
    getIndexListing($table) [@param string $table, @return list<string>]

getSchemas

v12.0.0 から

getSchemas()
@return list<array{name: string, path: string|null, default: bool}>
  1. v12.0.0 追加
    変更後
    getSchemas() [@return array]
  2. v12.9.0 シグネチャ変更
    変更前
    getSchemas() [@return array]
    変更後
    getSchemas() [@return list<array{name: string, path: string|null, default: bool}>]

getTableListing

v11.0.0 以前から

getTableListing($schema = null, $schemaQualified = true)
@param string|string[]|null $schema
@param bool $schemaQualified
@return list<string>
  1. v11.0.0 追加
    変更後
    getTableListing() [@return array]
  2. v12.0.0 シグネチャ変更
    変更前
    getTableListing() [@return array]
    変更後
    getTableListing($schema = null, $schemaQualified = true) [@param string|string[]|null $schema, @param bool $schemaQualified, @return array]
  3. v12.9.0 シグネチャ変更
    変更前
    getTableListing($schema = null, $schemaQualified = true) [@param string|string[]|null $schema, @param bool $schemaQualified, @return array]
    変更後
    getTableListing($schema = null, $schemaQualified = true) [@param string|string[]|null $schema, @param bool $schemaQualified, @return list<string>]

getTables

v11.0.0 以前から

getTables($schema = null)
@param string|string[]|null $schema
@return list<array{name: string, schema: string|null, schema_qualified_name: string, size: int|null, comment: string|null, collation: string|null, engine: string|null}>
  1. v11.0.0 追加
    変更後
    getTables() [@return array]
  2. v12.0.0 シグネチャ変更
    変更前
    getTables() [@return array]
    変更後
    getTables($schema = null) [@param string|string[]|null $schema, @return array]
  3. v12.9.0 シグネチャ変更
    変更前
    getTables($schema = null) [@param string|string[]|null $schema, @return array]
    変更後
    getTables($schema = null) [@param string|string[]|null $schema, @return list<array{name: string, schema: string|null, schema_qualified_name: string, size: int|null, comment: string|null, collation: string|null, engine: string|null}>]

getTypes

v11.0.0 以前から

getTypes($schema = null)
@param string|string[]|null $schema
@return list<array{name: string, schema: string, schema_qualified_name: string, type: string, category: string, implicit: bool}>
  1. v11.0.0 追加
    変更後
    getTypes() [@return array]
  2. v12.0.0 シグネチャ変更
    変更前
    getTypes() [@return array]
    変更後
    getTypes($schema = null) [@param string|string[]|null $schema, @return array]
  3. v12.9.0 シグネチャ変更
    変更前
    getTypes($schema = null) [@param string|string[]|null $schema, @return array]
    変更後
    getTypes($schema = null) [@param string|string[]|null $schema, @return list<array{name: string, schema: string, type: string, type: string, category: string, implicit: bool}>]
  4. v13.7.0 シグネチャ変更
    変更前
    getTypes($schema = null) [@param string|string[]|null $schema, @return list<array{name: string, schema: string, type: string, type: string, category: string, implicit: bool}>]
    変更後
    getTypes($schema = null) [@param string|string[]|null $schema, @return list<array{name: string, schema: string, schema_qualified_name: string, type: string, category: string, implicit: bool}>]

getViews

v11.0.0 以前から

getViews($schema = null)
@param string|string[]|null $schema
@return list<array{name: string, schema: string|null, schema_qualified_name: string, definition: string}>
  1. v11.0.0 追加
    変更後
    getViews() [@return array]
  2. v12.0.0 シグネチャ変更
    変更前
    getViews() [@return array]
    変更後
    getViews($schema = null) [@param string|string[]|null $schema, @return array]
  3. v12.9.0 シグネチャ変更
    変更前
    getViews($schema = null) [@param string|string[]|null $schema, @return array]
    変更後
    getViews($schema = null) [@param string|string[]|null $schema, @return list<array{name: string, schema: string|null, schema_qualified_name: string, definition: string}>]

hasColumn

v11.0.0 以前から

hasColumn($table, $column)
@param string $table
@param string $column
@return bool
  1. v11.0.0 追加
    変更後
    hasColumn($table, $column) [@param string $table, @param string $column, @return bool]

hasColumns

v11.0.0 以前から

hasColumns($table, array $columns)
@param string $table
@param array<string> $columns
@return bool
  1. v11.0.0 追加
    変更後
    hasColumns($table, array $columns) [@param string $table, @param array $columns, @return bool]
  2. v12.9.0 シグネチャ変更
    変更前
    hasColumns($table, array $columns) [@param string $table, @param array $columns, @return bool]
    変更後
    hasColumns($table, array $columns) [@param string $table, @param array<string> $columns, @return bool]

hasForeignKey

v13.10.0 から

hasForeignKey($table, $foreignKey)
@param string $table
@param array|string $foreignKey
@return bool
  1. v13.10.0 追加
    変更後
    hasForeignKey($table, $foreignKey) [@param string $table, @param array|string $foreignKey, @return bool]

hasIndex

v11.0.0 以前から

hasIndex($table, $index, $type = null)
@param string $table
@param string|array $index
@param string|null $type
@return bool
  1. v11.0.0 追加
    変更後
    hasIndex($table, $index, $type = null) [@param string $table, @param string|array $index, @param string|null $type, @return bool]

hasTable

v11.0.0 以前から

hasTable($table)
@param string $table
@return bool
  1. v11.0.0 追加
    変更後
    hasTable($table) [@param string $table, @return bool]

hasView

v11.0.0 以前から

hasView($view)
@param string $view
@return bool
  1. v11.0.0 追加
    変更後
    hasView($view) [@param string $view, @return bool]

morphUsingUlids

v11.0.0 以前から

static

static morphUsingUlids()
@return void
  1. v11.0.0 追加
    変更後
    static morphUsingUlids() [@return void]

morphUsingUuids

v11.0.0 以前から

static

static morphUsingUuids()
@return void
  1. v11.0.0 追加
    変更後
    static morphUsingUuids() [@return void]

parseSchemaAndTable

v12.0.0 から

parseSchemaAndTable($reference, $withDefaultSchema = null)
@param string $reference
@param string|bool|null $withDefaultSchema
@return array{string|null, string}
  1. v12.0.0 追加
    変更後
    parseSchemaAndTable($reference, $withDefaultSchema = null) [@param string $reference, @param string|bool|null $withDefaultSchema, @return array]
  2. v12.50.0 シグネチャ変更
    変更前
    parseSchemaAndTable($reference, $withDefaultSchema = null) [@param string $reference, @param string|bool|null $withDefaultSchema, @return array]
    変更後
    parseSchemaAndTable($reference, $withDefaultSchema = null) [@param string $reference, @param string|bool|null $withDefaultSchema, @return array{string|null, string}]

rename

v11.0.0 以前から

rename($from, $to)
@param string $from
@param string $to
@return void
  1. v11.0.0 追加
    変更後
    rename($from, $to) [@param string $from, @param string $to, @return void]

setConnection

v11.0.0 以前から

v12.0.0 で削除

  1. v11.0.0 追加
    変更後
    setConnection(Illuminate\Database\Connection $connection) [@param \Illuminate\Database\Connection $connection, @return $this]
  2. v12.0.0 削除
    変更前
    setConnection(Illuminate\Database\Connection $connection) [@param \Illuminate\Database\Connection $connection, @return $this]

table

v11.0.0 以前から

table($table, Closure $callback)
@param string $table
@param \Closure $callback
@return void
  1. v11.0.0 追加
    変更後
    table($table, Closure $callback) [@param string $table, @param \Closure $callback, @return void]

whenTableDoesntHaveColumn

v11.0.0 以前から

whenTableDoesntHaveColumn(string $table, string $column, Closure $callback)
@param string $table
@param string $column
@param \Closure $callback
@return void
  1. v11.0.0 追加
    変更後
    whenTableDoesntHaveColumn(string $table, string $column, Closure $callback) [@param string $table, @param string $column, @param \Closure $callback, @return void]

whenTableDoesntHaveIndex

v12.42.0 から

whenTableDoesntHaveIndex(string $table, string|array $index, Closure $callback, ?string $type = null)
@param string $table
@param string|array $index
@param \Closure $callback
@param string|null $type
@return void
  1. v12.42.0 追加
    変更後
    whenTableDoesntHaveIndex(string $table, string|array $index, Closure $callback, ?string $type = null) [@param string $table, @param string|array $index, @param \Closure $callback, @param string|null $type, @return void]

whenTableHasColumn

v11.0.0 以前から

whenTableHasColumn(string $table, string $column, Closure $callback)
@param string $table
@param string $column
@param \Closure $callback
@return void
  1. v11.0.0 追加
    変更後
    whenTableHasColumn(string $table, string $column, Closure $callback) [@param string $table, @param string $column, @param \Closure $callback, @return void]

whenTableHasIndex

v12.42.0 から

whenTableHasIndex(string $table, string|array $index, Closure $callback, ?string $type = null)
@param string $table
@param string|array $index
@param \Closure $callback
@param string|null $type
@return void
  1. v12.42.0 追加
    変更後
    whenTableHasIndex(string $table, string|array $index, Closure $callback, ?string $type = null) [@param string $table, @param string|array $index, @param \Closure $callback, @param string|null $type, @return void]

withoutForeignKeyConstraints

v11.0.0 以前から

withoutForeignKeyConstraints(Closure $callback)
@param (\Closure(): TReturn) $callback
@return TReturn
  1. v11.0.0 追加
    変更後
    withoutForeignKeyConstraints(Closure $callback) [@param \Closure $callback, @return mixed]
  2. v12.50.0 シグネチャ変更
    変更前
    withoutForeignKeyConstraints(Closure $callback) [@param \Closure $callback, @return mixed]
    変更後
    withoutForeignKeyConstraints(Closure $callback) [@param (\Closure(): TReturn) $callback, @return TReturn]