本文整理汇总了C#中MigrationBuilder.EnsurePostgresExtension方法的典型用法代码示例。如果您正苦于以下问题:C# MigrationBuilder.EnsurePostgresExtension方法的具体用法?C# MigrationBuilder.EnsurePostgresExtension怎么用?C# MigrationBuilder.EnsurePostgresExtension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MigrationBuilder
的用法示例。
在下文中一共展示了MigrationBuilder.EnsurePostgresExtension方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Up
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsurePostgresExtension("uuid-ossp");
migrationBuilder.CreateTable(
name: "cs_GeoCountry",
columns: table => new
{
Id = table.Column<Guid>(nullable: false)
.Annotation("Npgsql:ValueGeneratedOnAdd", true),
ISOCode2 = table.Column<string>(maxLength: 2, nullable: false),
ISOCode3 = table.Column<string>(maxLength: 3, nullable: false),
Name = table.Column<string>(maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_cs_GeoCountry", x => x.Id);
});
migrationBuilder.CreateTable(
name: "cs_GeoZone",
columns: table => new
{
Id = table.Column<Guid>(nullable: false)
.Annotation("Npgsql:ValueGeneratedOnAdd", true),
Code = table.Column<string>(maxLength: 255, nullable: false),
CountryId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_cs_GeoZone", x => x.Id);
});
migrationBuilder.CreateTable(
name: "cs_SiteHost",
columns: table => new
{
Id = table.Column<Guid>(nullable: false)
.Annotation("Npgsql:ValueGeneratedOnAdd", true),
HostName = table.Column<string>(maxLength: 255, nullable: false),
SiteId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_cs_SiteHost", x => x.Id);
});
migrationBuilder.CreateTable(
name: "cs_Role",
columns: table => new
{
Id = table.Column<Guid>(nullable: false)
.Annotation("Npgsql:ValueGeneratedOnAdd", true),
NormalizedRoleName = table.Column<string>(maxLength: 50, nullable: false),
RoleName = table.Column<string>(maxLength: 50, nullable: false),
SiteId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_cs_Role", x => x.Id);
});
migrationBuilder.CreateTable(
name: "cs_Site",
columns: table => new
{
Id = table.Column<Guid>(nullable: false)
.Annotation("Npgsql:ValueGeneratedOnAdd", true),
AccountApprovalEmailCsv = table.Column<string>(nullable: true),
AddThisDotComUsername = table.Column<string>(maxLength: 50, nullable: true),
AliasId = table.Column<string>(maxLength: 36, nullable: true),
AllowDbFallbackWithLdap = table.Column<bool>(nullable: false),
AllowNewRegistration = table.Column<bool>(nullable: false),
AllowPersistentLogin = table.Column<bool>(nullable: false),
AutoCreateLdapUserOnFirstLogin = table.Column<bool>(nullable: false),
CaptchaOnLogin = table.Column<bool>(nullable: false),
CaptchaOnRegistration = table.Column<bool>(nullable: false),
CompanyCountry = table.Column<string>(maxLength: 10, nullable: true),
CompanyFax = table.Column<string>(maxLength: 20, nullable: true),
CompanyLocality = table.Column<string>(maxLength: 200, nullable: true),
CompanyName = table.Column<string>(maxLength: 250, nullable: true),
CompanyPhone = table.Column<string>(maxLength: 20, nullable: true),
CompanyPostalCode = table.Column<string>(maxLength: 20, nullable: true),
CompanyPublicEmail = table.Column<string>(maxLength: 100, nullable: true),
CompanyRegion = table.Column<string>(maxLength: 200, nullable: true),
CompanyStreetAddress = table.Column<string>(maxLength: 250, nullable: true),
CompanyStreetAddress2 = table.Column<string>(maxLength: 250, nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreatedUtc = table.Column<DateTime>(nullable: false),
DefaultEmailFromAddress = table.Column<string>(maxLength: 100, nullable: true),
DefaultEmailFromAlias = table.Column<string>(maxLength: 100, nullable: true),
DisableDbAuth = table.Column<bool>(nullable: false),
DkimDomain = table.Column<string>(maxLength: 255, nullable: true),
DkimPrivateKey = table.Column<string>(nullable: true),
DkimPublicKey = table.Column<string>(nullable: true),
DkimSelector = table.Column<string>(maxLength: 128, nullable: true),
EmailLdapDbFallback = table.Column<bool>(nullable: false),
FacebookAppId = table.Column<string>(maxLength: 100, nullable: true),
FacebookAppSecret = table.Column<string>(nullable: true),
//.........这里部分代码省略.........