4 changed files with 142 additions and 159 deletions
@ -0,0 +1,30 @@ |
|||
// <auto-generated />
|
|||
using EShopOnAbp.CmskitService.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace EShopOnAbp.CmskitService.Migrations |
|||
{ |
|||
[DbContext(typeof(CmskitServiceDbContext))] |
|||
[Migration("20221006075206_Abp_6_0_Update")] |
|||
partial class Abp_6_0_Update |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) |
|||
.HasAnnotation("ProductVersion", "6.0.5") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 63); |
|||
|
|||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,108 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace EShopOnAbp.CmskitService.Migrations |
|||
{ |
|||
public partial class Abp_6_0_Update : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "CmsComments"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsRatings"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsUsers"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "CmsComments", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uuid", nullable: false), |
|||
EntityId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false), |
|||
EntityType = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "text", nullable: true), |
|||
RepliedCommentId = table.Column<Guid>(type: "uuid", nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uuid", nullable: true), |
|||
Text = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsComments", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsRatings", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uuid", nullable: false), |
|||
EntityId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false), |
|||
EntityType = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false), |
|||
StarCount = table.Column<short>(type: "smallint", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uuid", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsRatings", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsUsers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
Email = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false), |
|||
EmailConfirmed = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false), |
|||
ExtraProperties = table.Column<string>(type: "text", nullable: true), |
|||
Name = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true), |
|||
PhoneNumber = table.Column<string>(type: "character varying(16)", maxLength: 16, nullable: true), |
|||
PhoneNumberConfirmed = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false), |
|||
Surname = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uuid", nullable: true), |
|||
UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsComments_TenantId_EntityType_EntityId", |
|||
table: "CmsComments", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsComments_TenantId_RepliedCommentId", |
|||
table: "CmsComments", |
|||
columns: new[] { "TenantId", "RepliedCommentId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", |
|||
table: "CmsRatings", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUsers_TenantId_Email", |
|||
table: "CmsUsers", |
|||
columns: new[] { "TenantId", "Email" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUsers_TenantId_UserName", |
|||
table: "CmsUsers", |
|||
columns: new[] { "TenantId", "UserName" }); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue