Migration problemi
This commit is contained in:
parent
7d37a07e05
commit
41f972c727
18 changed files with 1687 additions and 46116 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,960 +0,0 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class NewTables : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MultipleCultures",
|
||||
table: "PLanguage");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsBranch",
|
||||
table: "PListForm",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsBranch",
|
||||
table: "PChart",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Address",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Address2",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "City",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Country",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "District",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Email",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Fax",
|
||||
table: "AbpTenants",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "InstitutionName",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(64)",
|
||||
maxLength: 64,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Mobile",
|
||||
table: "AbpTenants",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Phone",
|
||||
table: "AbpTenants",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PostalCode",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(10)",
|
||||
maxLength: 10,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TaxOffice",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(64)",
|
||||
maxLength: 64,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "VknTckn",
|
||||
table: "AbpTenants",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Website",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(256)",
|
||||
maxLength: 256,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Banks",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
IdentifierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
AddressLine1 = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
AddressLine2 = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
District = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
City = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
PostalCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
|
||||
Country = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
Phone = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
Email = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Banks", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBlogCategories",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Slug = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
Icon = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DisplayOrder = table.Column<int>(type: "int", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
PostCount = table.Column<int>(type: "int", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PBlogCategories", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBranch",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
VknTckn = table.Column<long>(type: "bigint", nullable: false),
|
||||
TaxOffice = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Address2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
District = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Country = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
City = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Phone = table.Column<long>(type: "bigint", nullable: true),
|
||||
Mobile = table.Column<long>(type: "bigint", nullable: false),
|
||||
Fax = table.Column<long>(type: "bigint", nullable: true),
|
||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PBranch", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBranchUsers",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PBranchUsers", x => new { x.UserId, x.BranchId });
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PContactTag",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Category = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PContactTag", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PContactTitle",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Abbreviation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PContactTitle", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCountryGroup",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCountryGroup", x => x.Id);
|
||||
table.UniqueConstraint("AK_PCountryGroup_Name", x => x.Name);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCurrency",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false),
|
||||
Symbol = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Rate = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
LastUpdated = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCurrency", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PForumCategories",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Slug = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
Icon = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
DisplayOrder = table.Column<int>(type: "int", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsLocked = table.Column<bool>(type: "bit", nullable: false),
|
||||
TopicCount = table.Column<int>(type: "int", nullable: false),
|
||||
PostCount = table.Column<int>(type: "int", nullable: false),
|
||||
LastPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastPostDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastPostUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastPostUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PForumCategories", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PSector",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
FullName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PSector", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PSkillType",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PSkillType", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PUomCategory",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PUomCategory", x => x.Id);
|
||||
table.UniqueConstraint("AK_PUomCategory_Name", x => x.Name);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBlogPosts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
Slug = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
ContentTr = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
ContentEn = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Summary = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
||||
CoverImage = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
ReadTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
ViewCount = table.Column<int>(type: "int", nullable: false),
|
||||
LikeCount = table.Column<int>(type: "int", nullable: false),
|
||||
CommentCount = table.Column<int>(type: "int", nullable: false),
|
||||
IsPublished = table.Column<bool>(type: "bit", nullable: false),
|
||||
PublishedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PBlogPosts", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PBlogPosts_PBlogCategories_CategoryId",
|
||||
column: x => x.CategoryId,
|
||||
principalTable: "PBlogCategories",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCountry",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
GroupName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||
CurrencyCode = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: true),
|
||||
PhoneCode = table.Column<int>(type: "int", maxLength: 16, nullable: false),
|
||||
TaxLabel = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
ZipRequired = table.Column<bool>(type: "bit", nullable: false),
|
||||
StateRequired = table.Column<bool>(type: "bit", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCountry", x => x.Id);
|
||||
table.UniqueConstraint("AK_PCountry_Code", x => x.Code);
|
||||
table.ForeignKey(
|
||||
name: "FK_PCountry_PCountryGroup_GroupName",
|
||||
column: x => x.GroupName,
|
||||
principalTable: "PCountryGroup",
|
||||
principalColumn: "Name",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BankAccounts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
AccountNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||
BankId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
AccountOwner = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CanTransferMoney = table.Column<bool>(type: "bit", nullable: false),
|
||||
Company = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BankAccounts", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BankAccounts_Banks_BankId",
|
||||
column: x => x.BankId,
|
||||
principalTable: "Banks",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_BankAccounts_PCurrency_CurrencyId",
|
||||
column: x => x.CurrencyId,
|
||||
principalTable: "PCurrency",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PForumTopics",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
AuthorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ViewCount = table.Column<int>(type: "int", nullable: false),
|
||||
ReplyCount = table.Column<int>(type: "int", nullable: false),
|
||||
LikeCount = table.Column<int>(type: "int", nullable: false),
|
||||
IsPinned = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsLocked = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsSolved = table.Column<bool>(type: "bit", nullable: false),
|
||||
LastPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastPostDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastPostUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastPostUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PForumTopics", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PForumTopics_PForumCategories_CategoryId",
|
||||
column: x => x.CategoryId,
|
||||
principalTable: "PForumCategories",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PSkill",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
TypeName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
SkillTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PSkill", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PSkill_PSkillType_SkillTypeId",
|
||||
column: x => x.SkillTypeId,
|
||||
principalTable: "PSkillType",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PSkillLevel",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Progress = table.Column<int>(type: "int", nullable: false),
|
||||
IsDefault = table.Column<bool>(type: "bit", nullable: false),
|
||||
TypeName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
SkillTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PSkillLevel", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PSkillLevel_PSkillType_SkillTypeId",
|
||||
column: x => x.SkillTypeId,
|
||||
principalTable: "PSkillType",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PUom",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||
Type = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
|
||||
Ratio = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
Rounding = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
|
||||
CategoryName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PUom", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PUom_PUomCategory_CategoryName",
|
||||
column: x => x.CategoryName,
|
||||
principalTable: "PUomCategory",
|
||||
principalColumn: "Name",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCity",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
|
||||
CountryCode = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCity", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PCity_PCountry_CountryCode",
|
||||
column: x => x.CountryCode,
|
||||
principalTable: "PCountry",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PForumPosts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TopicId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
AuthorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LikeCount = table.Column<int>(type: "int", nullable: false),
|
||||
IsAcceptedAnswer = table.Column<bool>(type: "bit", nullable: false),
|
||||
ParentPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PForumPosts", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PForumPosts_PForumPosts_ParentPostId",
|
||||
column: x => x.ParentPostId,
|
||||
principalTable: "PForumPosts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_PForumPosts_PForumTopics_TopicId",
|
||||
column: x => x.TopicId,
|
||||
principalTable: "PForumTopics",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BankAccounts_BankId",
|
||||
table: "BankAccounts",
|
||||
column: "BankId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BankAccounts_CurrencyId",
|
||||
table: "BankAccounts",
|
||||
column: "CurrencyId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PBlogCategories_Slug",
|
||||
table: "PBlogCategories",
|
||||
column: "Slug");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PBlogPosts_CategoryId",
|
||||
table: "PBlogPosts",
|
||||
column: "CategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PBlogPosts_IsPublished",
|
||||
table: "PBlogPosts",
|
||||
column: "IsPublished");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PBlogPosts_PublishedAt",
|
||||
table: "PBlogPosts",
|
||||
column: "PublishedAt");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PBlogPosts_Slug",
|
||||
table: "PBlogPosts",
|
||||
column: "Slug");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PCity_CountryCode_Code",
|
||||
table: "PCity",
|
||||
columns: new[] { "CountryCode", "Code" },
|
||||
unique: true,
|
||||
filter: "[CountryCode] IS NOT NULL AND [Code] IS NOT NULL");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PCountry_Code",
|
||||
table: "PCountry",
|
||||
column: "Code",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PCountry_GroupName",
|
||||
table: "PCountry",
|
||||
column: "GroupName");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PCountryGroup_Name",
|
||||
table: "PCountryGroup",
|
||||
column: "Name",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PForumCategories_DisplayOrder",
|
||||
table: "PForumCategories",
|
||||
column: "DisplayOrder");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PForumPosts_ParentPostId",
|
||||
table: "PForumPosts",
|
||||
column: "ParentPostId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PForumPosts_TopicId",
|
||||
table: "PForumPosts",
|
||||
column: "TopicId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PForumTopics_CategoryId",
|
||||
table: "PForumTopics",
|
||||
column: "CategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PForumTopics_IsPinned",
|
||||
table: "PForumTopics",
|
||||
column: "IsPinned");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PForumTopics_LastPostDate",
|
||||
table: "PForumTopics",
|
||||
column: "LastPostDate");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PSkill_SkillTypeId",
|
||||
table: "PSkill",
|
||||
column: "SkillTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PSkillLevel_SkillTypeId",
|
||||
table: "PSkillLevel",
|
||||
column: "SkillTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PSkillType_Name",
|
||||
table: "PSkillType",
|
||||
column: "Name",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PUom_CategoryName",
|
||||
table: "PUom",
|
||||
column: "CategoryName");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PUomCategory_Name",
|
||||
table: "PUomCategory",
|
||||
column: "Name",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "BankAccounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBlogPosts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBranch");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBranchUsers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PContactTag");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PContactTitle");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PForumPosts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PSector");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PSkill");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PSkillLevel");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PUom");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Banks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCurrency");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBlogCategories");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCountry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PForumTopics");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PSkillType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PUomCategory");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCountryGroup");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PForumCategories");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsBranch",
|
||||
table: "PListForm");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsBranch",
|
||||
table: "PChart");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Address",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Address2",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "City",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Country",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "District",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Email",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Fax",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InstitutionName",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Mobile",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Phone",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PostalCode",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TaxOffice",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "VknTckn",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Website",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "MultipleCultures",
|
||||
table: "PLanguage",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,389 +0,0 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddRoutes : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PBlogPosts_PBlogCategories_CategoryId",
|
||||
table: "PBlogPosts");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PForumPosts_PForumPosts_ParentPostId",
|
||||
table: "PForumPosts");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PForumPosts_PForumTopics_TopicId",
|
||||
table: "PForumPosts");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PForumTopics_PForumCategories_CategoryId",
|
||||
table: "PForumTopics");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PForumTopics",
|
||||
table: "PForumTopics");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PForumPosts",
|
||||
table: "PForumPosts");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PForumCategories",
|
||||
table: "PForumCategories");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PBlogPosts",
|
||||
table: "PBlogPosts");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PBlogCategories",
|
||||
table: "PBlogCategories");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PForumTopics",
|
||||
newName: "PForumTopic");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PForumPosts",
|
||||
newName: "PForumPost");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PForumCategories",
|
||||
newName: "PForumCategory");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PBlogPosts",
|
||||
newName: "PBlogPost");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PBlogCategories",
|
||||
newName: "PBlogCategory");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumTopics_LastPostDate",
|
||||
table: "PForumTopic",
|
||||
newName: "IX_PForumTopic_LastPostDate");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumTopics_IsPinned",
|
||||
table: "PForumTopic",
|
||||
newName: "IX_PForumTopic_IsPinned");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumTopics_CategoryId",
|
||||
table: "PForumTopic",
|
||||
newName: "IX_PForumTopic_CategoryId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumPosts_TopicId",
|
||||
table: "PForumPost",
|
||||
newName: "IX_PForumPost_TopicId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumPosts_ParentPostId",
|
||||
table: "PForumPost",
|
||||
newName: "IX_PForumPost_ParentPostId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumCategories_DisplayOrder",
|
||||
table: "PForumCategory",
|
||||
newName: "IX_PForumCategory_DisplayOrder");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPosts_Slug",
|
||||
table: "PBlogPost",
|
||||
newName: "IX_PBlogPost_Slug");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPosts_PublishedAt",
|
||||
table: "PBlogPost",
|
||||
newName: "IX_PBlogPost_PublishedAt");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPosts_IsPublished",
|
||||
table: "PBlogPost",
|
||||
newName: "IX_PBlogPost_IsPublished");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPosts_CategoryId",
|
||||
table: "PBlogPost",
|
||||
newName: "IX_PBlogPost_CategoryId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogCategories_Slug",
|
||||
table: "PBlogCategory",
|
||||
newName: "IX_PBlogCategory_Slug");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PForumTopic",
|
||||
table: "PForumTopic",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PForumPost",
|
||||
table: "PForumPost",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PForumCategory",
|
||||
table: "PForumCategory",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PBlogPost",
|
||||
table: "PBlogPost",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PBlogCategory",
|
||||
table: "PBlogCategory",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PRoute",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Key = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Path = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
ComponentPath = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
RouteType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Authority = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PRoute", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PRoute_Key",
|
||||
table: "PRoute",
|
||||
column: "Key",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PBlogPost_PBlogCategory_CategoryId",
|
||||
table: "PBlogPost",
|
||||
column: "CategoryId",
|
||||
principalTable: "PBlogCategory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PForumPost_PForumPost_ParentPostId",
|
||||
table: "PForumPost",
|
||||
column: "ParentPostId",
|
||||
principalTable: "PForumPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PForumPost_PForumTopic_TopicId",
|
||||
table: "PForumPost",
|
||||
column: "TopicId",
|
||||
principalTable: "PForumTopic",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PForumTopic_PForumCategory_CategoryId",
|
||||
table: "PForumTopic",
|
||||
column: "CategoryId",
|
||||
principalTable: "PForumCategory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PBlogPost_PBlogCategory_CategoryId",
|
||||
table: "PBlogPost");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PForumPost_PForumPost_ParentPostId",
|
||||
table: "PForumPost");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PForumPost_PForumTopic_TopicId",
|
||||
table: "PForumPost");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PForumTopic_PForumCategory_CategoryId",
|
||||
table: "PForumTopic");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PRoute");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PForumTopic",
|
||||
table: "PForumTopic");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PForumPost",
|
||||
table: "PForumPost");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PForumCategory",
|
||||
table: "PForumCategory");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PBlogPost",
|
||||
table: "PBlogPost");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PBlogCategory",
|
||||
table: "PBlogCategory");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PForumTopic",
|
||||
newName: "PForumTopics");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PForumPost",
|
||||
newName: "PForumPosts");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PForumCategory",
|
||||
newName: "PForumCategories");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PBlogPost",
|
||||
newName: "PBlogPosts");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "PBlogCategory",
|
||||
newName: "PBlogCategories");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumTopic_LastPostDate",
|
||||
table: "PForumTopics",
|
||||
newName: "IX_PForumTopics_LastPostDate");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumTopic_IsPinned",
|
||||
table: "PForumTopics",
|
||||
newName: "IX_PForumTopics_IsPinned");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumTopic_CategoryId",
|
||||
table: "PForumTopics",
|
||||
newName: "IX_PForumTopics_CategoryId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumPost_TopicId",
|
||||
table: "PForumPosts",
|
||||
newName: "IX_PForumPosts_TopicId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumPost_ParentPostId",
|
||||
table: "PForumPosts",
|
||||
newName: "IX_PForumPosts_ParentPostId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PForumCategory_DisplayOrder",
|
||||
table: "PForumCategories",
|
||||
newName: "IX_PForumCategories_DisplayOrder");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPost_Slug",
|
||||
table: "PBlogPosts",
|
||||
newName: "IX_PBlogPosts_Slug");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPost_PublishedAt",
|
||||
table: "PBlogPosts",
|
||||
newName: "IX_PBlogPosts_PublishedAt");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPost_IsPublished",
|
||||
table: "PBlogPosts",
|
||||
newName: "IX_PBlogPosts_IsPublished");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogPost_CategoryId",
|
||||
table: "PBlogPosts",
|
||||
newName: "IX_PBlogPosts_CategoryId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PBlogCategory_Slug",
|
||||
table: "PBlogCategories",
|
||||
newName: "IX_PBlogCategories_Slug");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PForumTopics",
|
||||
table: "PForumTopics",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PForumPosts",
|
||||
table: "PForumPosts",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PForumCategories",
|
||||
table: "PForumCategories",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PBlogPosts",
|
||||
table: "PBlogPosts",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PBlogCategories",
|
||||
table: "PBlogCategories",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PBlogPosts_PBlogCategories_CategoryId",
|
||||
table: "PBlogPosts",
|
||||
column: "CategoryId",
|
||||
principalTable: "PBlogCategories",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PForumPosts_PForumPosts_ParentPostId",
|
||||
table: "PForumPosts",
|
||||
column: "ParentPostId",
|
||||
principalTable: "PForumPosts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PForumPosts_PForumTopics_TopicId",
|
||||
table: "PForumPosts",
|
||||
column: "TopicId",
|
||||
principalTable: "PForumTopics",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PForumTopics_PForumCategories_CategoryId",
|
||||
table: "PForumTopics",
|
||||
column: "CategoryId",
|
||||
principalTable: "PForumCategories",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,79 +0,0 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CustomEndpoint : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PPublicApi");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCustomEndpoint",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Method = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DataSourceCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Sql = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ParametersJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PermissionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCustomEndpoint", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCustomEndpoint");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PPublicApi",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DataSourceCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Method = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ParametersJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PermissionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Sql = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Url = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PPublicApi", x => x.Id);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,38 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class LanguageTextVarchar4000 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Value",
|
||||
table: "PLanguageText",
|
||||
type: "nvarchar(4000)",
|
||||
maxLength: 4000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(1000)",
|
||||
oldMaxLength: 1000);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Value",
|
||||
table: "PLanguageText",
|
||||
type: "nvarchar(1000)",
|
||||
maxLength: 1000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(4000)",
|
||||
oldMaxLength: 4000);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,195 +0,0 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DeveloperKit : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCustomComponent",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Props = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
Dependencies = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCustomComponent", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCustomEntity",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
DisplayName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
TableName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
HasAuditFields = table.Column<bool>(type: "bit", nullable: false),
|
||||
HasSoftDelete = table.Column<bool>(type: "bit", nullable: false),
|
||||
MigrationStatus = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
MigrationId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EndpointStatus = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCustomEntity", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PApiEndpoint",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EntityName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Method = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
|
||||
Path = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
OperationType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
CsharpCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
EntityId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PApiEndpoint", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PApiEndpoint_PCustomEntity_EntityId",
|
||||
column: x => x.EntityId,
|
||||
principalTable: "PCustomEntity",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PApiMigration",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EntityId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
EntityName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
FileName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
SqlScript = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Status = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
AppliedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ErrorMessage = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PApiMigration", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PApiMigration_PCustomEntity_EntityId",
|
||||
column: x => x.EntityId,
|
||||
principalTable: "PCustomEntity",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PCustomEntityField",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
EntityId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
IsRequired = table.Column<bool>(type: "bit", nullable: false),
|
||||
MaxLength = table.Column<int>(type: "int", nullable: true),
|
||||
IsUnique = table.Column<bool>(type: "bit", nullable: false),
|
||||
DefaultValue = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PCustomEntityField", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PCustomEntityField_PCustomEntity_EntityId",
|
||||
column: x => x.EntityId,
|
||||
principalTable: "PCustomEntity",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PApiEndpoint_EntityId",
|
||||
table: "PApiEndpoint",
|
||||
column: "EntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PApiMigration_EntityId",
|
||||
table: "PApiMigration",
|
||||
column: "EntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PCustomEntityField_EntityId",
|
||||
table: "PCustomEntityField",
|
||||
column: "EntityId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PApiEndpoint");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PApiMigration");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCustomComponent");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCustomEntityField");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PCustomEntity");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,38 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OrgnanizationName : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "InstitutionName",
|
||||
table: "POrder",
|
||||
newName: "OrganizationName");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "InstitutionName",
|
||||
table: "AbpTenants",
|
||||
newName: "OrganizationName");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "OrganizationName",
|
||||
table: "POrder",
|
||||
newName: "InstitutionName");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "OrganizationName",
|
||||
table: "AbpTenants",
|
||||
newName: "InstitutionName");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,217 +0,0 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class VirtualClass : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PClassSession",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
Subject = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
TeacherId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
TeacherName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
ScheduledStartTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ActualStartTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
EndTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Duration = table.Column<int>(type: "int", nullable: false),
|
||||
MaxParticipants = table.Column<int>(type: "int", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsScheduled = table.Column<bool>(type: "bit", nullable: false),
|
||||
ParticipantCount = table.Column<int>(type: "int", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PClassSession", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PAttendanceRecord",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SessionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
StudentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
StudentName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
JoinTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
LeaveTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
TotalDurationMinutes = table.Column<int>(type: "int", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PAttendanceRecord", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PAttendanceRecord_PClassSession_SessionId",
|
||||
column: x => x.SessionId,
|
||||
principalTable: "PClassSession",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PChatMessage",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SessionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SenderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SenderName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Message = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false),
|
||||
Timestamp = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
IsTeacher = table.Column<bool>(type: "bit", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PChatMessage", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PChatMessage_PClassSession_SessionId",
|
||||
column: x => x.SessionId,
|
||||
principalTable: "PClassSession",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PParticipant",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SessionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
UserName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
UserEmail = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
IsTeacher = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsAudioMuted = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsVideoMuted = table.Column<bool>(type: "bit", nullable: false),
|
||||
JoinTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ConnectionId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PParticipant", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PParticipant_PClassSession_SessionId",
|
||||
column: x => x.SessionId,
|
||||
principalTable: "PClassSession",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PAttendanceRecord_JoinTime",
|
||||
table: "PAttendanceRecord",
|
||||
column: "JoinTime");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PAttendanceRecord_SessionId",
|
||||
table: "PAttendanceRecord",
|
||||
column: "SessionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PAttendanceRecord_StudentId",
|
||||
table: "PAttendanceRecord",
|
||||
column: "StudentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PChatMessage_SenderId",
|
||||
table: "PChatMessage",
|
||||
column: "SenderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PChatMessage_SessionId",
|
||||
table: "PChatMessage",
|
||||
column: "SessionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PChatMessage_Timestamp",
|
||||
table: "PChatMessage",
|
||||
column: "Timestamp");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PClassSession_IsActive",
|
||||
table: "PClassSession",
|
||||
column: "IsActive");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PClassSession_ScheduledStartTime",
|
||||
table: "PClassSession",
|
||||
column: "ScheduledStartTime");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PClassSession_TeacherId",
|
||||
table: "PClassSession",
|
||||
column: "TeacherId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PParticipant_SessionId",
|
||||
table: "PParticipant",
|
||||
column: "SessionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PParticipant_SessionId_UserId",
|
||||
table: "PParticipant",
|
||||
columns: new[] { "SessionId", "UserId" },
|
||||
unique: true,
|
||||
filter: "[UserId] IS NOT NULL");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PParticipant_UserId",
|
||||
table: "PParticipant",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PAttendanceRecord");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PChatMessage");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PParticipant");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PClassSession");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20250825175413_VirtualClass")]
|
||||
partial class VirtualClass
|
||||
[Migration("20250826054655_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue