MigrationBuilder.AlterColumn Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing) As OperationBuilder(Of AlterColumnOperation)
Typparameter
- T
Parameter
- name
- String
- table
- String
- type
- String
- rowVersion
- Boolean
- schema
- String
- nullable
- Boolean
- defaultValue
- Object
- defaultValueSql
- String
- computedColumnSql
- String
Gibt zurück
Gilt für:
AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String)
- Quelle:
- MigrationBuilder.cs
- Quelle:
- MigrationBuilder.cs
Erstellt eine AlterColumnOperation , um eine vorhandene Spalte zu ändern.
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type, bool? unicode, int? maxLength, bool rowVersion, string schema, bool nullable, object defaultValue, string defaultValueSql, string computedColumnSql, Type oldClrType, string oldType, bool? oldUnicode, int? oldMaxLength, bool oldRowVersion, bool oldNullable, object oldDefaultValue, string oldDefaultValueSql, string oldComputedColumnSql);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)
Public Overridable Function AlterColumn(Of T) (name As String, table As String, type As String, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), rowVersion As Boolean, schema As String, nullable As Boolean, defaultValue As Object, defaultValueSql As String, computedColumnSql As String, oldClrType As Type, oldType As String, oldUnicode As Nullable(Of Boolean), oldMaxLength As Nullable(Of Integer), oldRowVersion As Boolean, oldNullable As Boolean, oldDefaultValue As Object, oldDefaultValueSql As String, oldComputedColumnSql As String) As AlterOperationBuilder(Of AlterColumnOperation)
Typparameter
- T
Der CLR-Typ, dem die Spalte zugeordnet ist.
Parameter
- name
- String
Der Spaltenname.
- table
- String
Der Name der Tabelle, die die Spalte enthält.
- type
- String
Der Speicher-/Datenbanktyp der Spalte.
Gibt an, ob die Spalte Unicode-Daten enthalten kann oder null
ob nicht angegeben oder nicht zutreffend ist.
Die maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- rowVersion
- Boolean
Gibt an, ob die Spalte als automatisches Parallelitätstoken fungiert, z. B. eine rowversion/timestamp-Spalte in SQL Server.
- schema
- String
Das Schema, das die Tabelle enthält, oder null
, wenn das Standardschema verwendet werden soll.
- nullable
- Boolean
Gibt an, ob die Spalte Werte speichern NULL
kann.
- defaultValue
- Object
Der Standardwert für die Spalte.
- defaultValueSql
- String
Der SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet werden soll.
- computedColumnSql
- String
Der SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet werden soll.
- oldClrType
- Type
Der CLR-Typ, dem die Spalte zuvor zugeordnet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldType
- String
Der vorherige Speicher-/Datenbanktyp der Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt an, ob die Spalte zuvor Unicode-Daten enthalten konnte, oder null
ob nicht angegeben oder nicht zutreffend.
Die vorherige maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- oldRowVersion
- Boolean
Gibt an, ob die Spalte zuvor als automatisches Parallelitätstoken fungierte, z. B. eine rowversion/timestamp-Spalte in SQL Server. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldNullable
- Boolean
Gibt an, ob die Spalte zuvor Werte speichern NULL
konnte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValue
- Object
Der vorherige Standardwert für die Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValueSql
- String
Der vorherige SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldComputedColumnSql
- String
Der vorherige SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt zurück
Ein Generator, der das Hinzufügen von Anmerkungen zum Vorgang ermöglicht.
Gilt für:
AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>)
- Quelle:
- MigrationBuilder.cs
- Quelle:
- MigrationBuilder.cs
Erstellt eine AlterColumnOperation , um eine vorhandene Spalte zu ändern.
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional oldFixedLength As Nullable(Of Boolean) = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)
Typparameter
- T
Der CLR-Typ, dem die Spalte zugeordnet ist.
Parameter
- name
- String
Der Spaltenname.
- table
- String
Der Name der Tabelle, die die Spalte enthält.
- type
- String
Der Speicher-/Datenbanktyp der Spalte.
Gibt an, ob die Spalte Unicode-Daten enthalten kann oder null
ob nicht angegeben oder nicht zutreffend ist.
Die maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- rowVersion
- Boolean
Gibt an, ob die Spalte als automatisches Parallelitätstoken fungiert, z. B. eine rowversion/timestamp-Spalte in SQL Server.
- schema
- String
Das Schema, das die Tabelle enthält, oder null
, wenn das Standardschema verwendet werden soll.
- nullable
- Boolean
Gibt an, ob die Spalte Werte speichern NULL
kann.
- defaultValue
- Object
Der Standardwert für die Spalte.
- defaultValueSql
- String
Der SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet werden soll.
- computedColumnSql
- String
Der SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet werden soll.
- oldClrType
- Type
Der CLR-Typ, dem die Spalte zuvor zugeordnet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldType
- String
Der vorherige Speicher-/Datenbanktyp der Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt an, ob die Spalte zuvor Unicode-Daten enthalten konnte, oder null
ob nicht angegeben oder nicht zutreffend.
Die vorherige maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- oldRowVersion
- Boolean
Gibt an, ob die Spalte zuvor als automatisches Parallelitätstoken fungierte, z. B. eine rowversion/timestamp-Spalte in SQL Server. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldNullable
- Boolean
Gibt an, ob die Spalte zuvor Werte speichern NULL
konnte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValue
- Object
Der vorherige Standardwert für die Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValueSql
- String
Der vorherige SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldComputedColumnSql
- String
Der vorherige SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt an, ob die Spalte zuvor auf Daten mit fester Länge beschränkt war.
Gibt zurück
Ein Generator, der das Hinzufügen von Anmerkungen zum Vorgang ermöglicht.
Gilt für:
AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String)
- Quelle:
- MigrationBuilder.cs
- Quelle:
- MigrationBuilder.cs
Erstellt eine AlterColumnOperation , um eine vorhandene Spalte zu ändern.
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default, string comment = default, string oldComment = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional oldFixedLength As Nullable(Of Boolean) = Nothing, Optional comment As String = Nothing, Optional oldComment As String = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)
Typparameter
- T
Der CLR-Typ, dem die Spalte zugeordnet ist.
Parameter
- name
- String
Der Spaltenname.
- table
- String
Der Name der Tabelle, die die Spalte enthält.
- type
- String
Der Speicher-/Datenbanktyp der Spalte.
Gibt an, ob die Spalte Unicode-Daten enthalten kann oder null
ob nicht angegeben oder nicht zutreffend ist.
Die maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- rowVersion
- Boolean
Gibt an, ob die Spalte als automatisches Parallelitätstoken fungiert, z. B. eine rowversion/timestamp-Spalte in SQL Server.
- schema
- String
Das Schema, das die Tabelle enthält, oder null
, wenn das Standardschema verwendet werden soll.
- nullable
- Boolean
Gibt an, ob die Spalte Werte speichern NULL
kann.
- defaultValue
- Object
Der Standardwert für die Spalte.
- defaultValueSql
- String
Der SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet werden soll.
- computedColumnSql
- String
Der SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet werden soll.
- oldClrType
- Type
Der CLR-Typ, dem die Spalte zuvor zugeordnet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldType
- String
Der vorherige Speicher-/Datenbanktyp der Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt an, ob die Spalte zuvor Unicode-Daten enthalten konnte, oder null
ob nicht angegeben oder nicht zutreffend.
Die vorherige maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- oldRowVersion
- Boolean
Gibt an, ob die Spalte zuvor als automatisches Parallelitätstoken fungierte, z. B. eine rowversion/timestamp-Spalte in SQL Server. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldNullable
- Boolean
Gibt an, ob die Spalte zuvor Werte speichern NULL
konnte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValue
- Object
Der vorherige Standardwert für die Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValueSql
- String
Der vorherige SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldComputedColumnSql
- String
Der vorherige SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt an, ob die Spalte zuvor auf Daten mit fester Länge beschränkt war.
- comment
- String
Ein Kommentar, der der Spalte zugeordnet werden soll.
- oldComment
- String
Der vorherige Kommentar, der der Spalte zugeordnet werden soll.
Gibt zurück
Ein Generator, der das Hinzufügen von Anmerkungen zum Vorgang ermöglicht.
Gilt für:
AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>)
- Quelle:
- MigrationBuilder.cs
- Quelle:
- MigrationBuilder.cs
- Quelle:
- MigrationBuilder.cs
- Quelle:
- MigrationBuilder.cs
- Quelle:
- MigrationBuilder.cs
Erstellt eine AlterColumnOperation , um eine vorhandene Spalte zu ändern.
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string schema = default, bool nullable = false, object defaultValue = default, string defaultValueSql = default, string computedColumnSql = default, Type oldClrType = default, string oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = default, string oldDefaultValueSql = default, string oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default, string comment = default, string oldComment = default, string collation = default, string oldCollation = default, int? precision = default, int? oldPrecision = default, int? scale = default, int? oldScale = default, bool? stored = default, bool? oldStored = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation> AlterColumn<T> (string name, string table, string? type = default, bool? unicode = default, int? maxLength = default, bool rowVersion = false, string? schema = default, bool nullable = false, object? defaultValue = default, string? defaultValueSql = default, string? computedColumnSql = default, Type? oldClrType = default, string? oldType = default, bool? oldUnicode = default, int? oldMaxLength = default, bool oldRowVersion = false, bool oldNullable = false, object? oldDefaultValue = default, string? oldDefaultValueSql = default, string? oldComputedColumnSql = default, bool? fixedLength = default, bool? oldFixedLength = default, string? comment = default, string? oldComment = default, string? collation = default, string? oldCollation = default, int? precision = default, int? oldPrecision = default, int? scale = default, int? oldScale = default, bool? stored = default, bool? oldStored = default);
abstract member AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string * string * string * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
override this.AlterColumn : string * string * string * Nullable<bool> * Nullable<int> * bool * string * bool * obj * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Nullable<bool> * Nullable<bool> * string * string * string * string * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<bool> * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation>
Public Overridable Function AlterColumn(Of T) (name As String, table As String, Optional type As String = Nothing, Optional unicode As Nullable(Of Boolean) = Nothing, Optional maxLength As Nullable(Of Integer) = Nothing, Optional rowVersion As Boolean = false, Optional schema As String = Nothing, Optional nullable As Boolean = false, Optional defaultValue As Object = Nothing, Optional defaultValueSql As String = Nothing, Optional computedColumnSql As String = Nothing, Optional oldClrType As Type = Nothing, Optional oldType As String = Nothing, Optional oldUnicode As Nullable(Of Boolean) = Nothing, Optional oldMaxLength As Nullable(Of Integer) = Nothing, Optional oldRowVersion As Boolean = false, Optional oldNullable As Boolean = false, Optional oldDefaultValue As Object = Nothing, Optional oldDefaultValueSql As String = Nothing, Optional oldComputedColumnSql As String = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional oldFixedLength As Nullable(Of Boolean) = Nothing, Optional comment As String = Nothing, Optional oldComment As String = Nothing, Optional collation As String = Nothing, Optional oldCollation As String = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional oldPrecision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing, Optional oldScale As Nullable(Of Integer) = Nothing, Optional stored As Nullable(Of Boolean) = Nothing, Optional oldStored As Nullable(Of Boolean) = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)
Typparameter
- T
Der CLR-Typ, dem die Spalte zugeordnet ist.
Parameter
- name
- String
Der Spaltenname.
- table
- String
Der Name der Tabelle, die die Spalte enthält.
- type
- String
Der Speicher-/Datenbanktyp der Spalte.
Gibt an, ob die Spalte Unicode-Daten enthalten kann oder null
ob nicht angegeben oder nicht zutreffend ist.
Die maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- rowVersion
- Boolean
Gibt an, ob die Spalte als automatisches Parallelitätstoken fungiert, z. B. eine rowversion/timestamp-Spalte in SQL Server.
- schema
- String
Das Schema, das die Tabelle enthält, oder null
, wenn das Standardschema verwendet werden soll.
- nullable
- Boolean
Gibt an, ob die Spalte Werte speichern null
kann.
- defaultValue
- Object
Der Standardwert für die Spalte.
- defaultValueSql
- String
Der SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet werden soll.
- computedColumnSql
- String
Der SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet werden soll.
- oldClrType
- Type
Der CLR-Typ, dem die Spalte zuvor zugeordnet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldType
- String
Der vorherige Speicher-/Datenbanktyp der Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt an, ob die Spalte zuvor Unicode-Daten enthalten konnte, oder null
ob nicht angegeben oder nicht zutreffend.
Die vorherige maximale Länge der Daten, die in der Spalte gespeichert werden können, oder null
wenn nicht angegeben oder nicht zutreffend.
- oldRowVersion
- Boolean
Gibt an, ob die Spalte zuvor als automatisches Parallelitätstoken fungierte, z. B. eine rowversion/timestamp-Spalte in SQL Server. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldNullable
- Boolean
Gibt an, ob die Spalte zuvor Werte speichern null
konnte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValue
- Object
Der vorherige Standardwert für die Spalte. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldDefaultValueSql
- String
Der vorherige SQL-Ausdruck, der für die Standardeinschränkung der Spalte verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
- oldComputedColumnSql
- String
Der vorherige SQL-Ausdruck, der zum Berechnen des Spaltenwerts verwendet wurde. Kann sein null
. In diesem Fall gilt der vorherige Wert als unbekannt.
Gibt an, ob die Spalte zuvor auf Daten mit fester Länge beschränkt war.
- comment
- String
Ein Kommentar, der der Spalte zugeordnet werden soll.
- oldComment
- String
Der vorherige Kommentar, der der Spalte zugeordnet werden soll.
- collation
- String
Eine Sortierung, die auf die Spalte angewendet werden soll.
- oldCollation
- String
Die vorherige Sortierung, die auf die Spalte angewendet werden soll.
Die maximale Anzahl von Ziffern, die in dieser Spalte zulässig sind, oder null
wenn nicht angegeben oder nicht zutreffend.
Die vorherige maximale Anzahl von Ziffern, die in dieser Spalte zulässig sind, oder null
wenn nicht angegeben oder nicht zutreffend.
Die maximale Anzahl von Dezimalstellen, die in dieser Spalte zulässig ist, oder null
wenn nicht angegeben oder nicht zutreffend.
Die vorherige maximale Anzahl von Dezimalstellen, die in dieser Spalte zulässig ist, oder null
wenn nicht angegeben oder nicht zutreffend.
Gibt an, ob der Wert der berechneten Spalte in der Datenbank gespeichert wird oder nicht.
Gibt an, ob der Wert der vorherigen berechneten Spalte in der Datenbank gespeichert wurde.
Gibt zurück
Ein Generator, der das Hinzufügen von Anmerkungen zum Vorgang ermöglicht.
Hinweise
Weitere Informationen und Beispiele finden Sie unter Datenbankmigrationen .
Gilt für:
Entity Framework