SqlServerMigrationsSqlGenerator.DropDefaultConstraint 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| DropDefaultConstraint(String, String, String, MigrationCommandListBuilder) |
生成 SQL 片段以删除列的默认约束。 |
| DropDefaultConstraint(String, String, String, String, MigrationCommandListBuilder) |
生成 SQL 片段以删除列的默认约束。 |
DropDefaultConstraint(String, String, String, MigrationCommandListBuilder)
生成 SQL 片段以删除列的默认约束。
protected virtual void DropDefaultConstraint(string schema, string tableName, string columnName, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void DropDefaultConstraint(string? schema, string tableName, string columnName, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member DropDefaultConstraint : string * string * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.DropDefaultConstraint : string * string * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub DropDefaultConstraint (schema As String, tableName As String, columnName As String, builder As MigrationCommandListBuilder)
参数
- schema
- String
包含表的架构。
- tableName
- String
包含列的表。
- columnName
- String
列。
- builder
- MigrationCommandListBuilder
用于添加 SQL 片段的命令生成器。
适用于
DropDefaultConstraint(String, String, String, String, MigrationCommandListBuilder)
生成 SQL 片段以删除列的默认约束。
protected virtual void DropDefaultConstraint(string? schema, string tableName, string columnName, string? defaultConstraintName, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member DropDefaultConstraint : string * string * string * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.DropDefaultConstraint : string * string * string * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub DropDefaultConstraint (schema As String, tableName As String, columnName As String, defaultConstraintName As String, builder As MigrationCommandListBuilder)
参数
- schema
- String
包含表的架构。
- tableName
- String
包含列的表。
- columnName
- String
列。
- defaultConstraintName
- String
默认约束的名称。
- builder
- MigrationCommandListBuilder
用于添加 SQL 片段的命令生成器。