331 lines
12 KiB
C#
331 lines
12 KiB
C#
![]() |
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace VOL.Core.Migrations
|
|||
|
{
|
|||
|
public partial class init044 : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_I_SpecialChapter_I_SpecialUnit_SpecialUnitId",
|
|||
|
table: "I_SpecialChapter");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_I_SpecialCourse_I_SpecialChapter_SpecialChapterId",
|
|||
|
table: "I_SpecialCourse");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_I_SpecialExplain_I_SpecialCourse_SpecialCourseId",
|
|||
|
table: "I_SpecialExplain");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_I_SpecialUnit_I_Special_SpecialId",
|
|||
|
table: "I_SpecialUnit");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_I_SpecialVideo_I_SpecialExplain_SpecialExplainId",
|
|||
|
table: "I_SpecialVideo");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_I_SpecialVideo",
|
|||
|
table: "I_SpecialVideo");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_I_SpecialUnit",
|
|||
|
table: "I_SpecialUnit");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_I_SpecialExplain",
|
|||
|
table: "I_SpecialExplain");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_I_SpecialCourse",
|
|||
|
table: "I_SpecialCourse");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_I_SpecialChapter",
|
|||
|
table: "I_SpecialChapter");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_I_Special",
|
|||
|
table: "I_Special");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "I_SpecialVideo",
|
|||
|
newName: "Ai_SpecialVideo");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "I_SpecialUnit",
|
|||
|
newName: "Ai_SpecialUnit");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "I_SpecialExplain",
|
|||
|
newName: "Ai_SpecialExplain");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "I_SpecialCourse",
|
|||
|
newName: "Ai_SpecialCourse");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "I_SpecialChapter",
|
|||
|
newName: "Ai_SpecialChapter");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "I_Special",
|
|||
|
newName: "Ai_Special");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_I_SpecialVideo_SpecialExplainId",
|
|||
|
table: "Ai_SpecialVideo",
|
|||
|
newName: "IX_Ai_SpecialVideo_SpecialExplainId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_I_SpecialUnit_SpecialId",
|
|||
|
table: "Ai_SpecialUnit",
|
|||
|
newName: "IX_Ai_SpecialUnit_SpecialId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_I_SpecialExplain_SpecialCourseId",
|
|||
|
table: "Ai_SpecialExplain",
|
|||
|
newName: "IX_Ai_SpecialExplain_SpecialCourseId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_I_SpecialCourse_SpecialChapterId",
|
|||
|
table: "Ai_SpecialCourse",
|
|||
|
newName: "IX_Ai_SpecialCourse_SpecialChapterId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_I_SpecialChapter_SpecialUnitId",
|
|||
|
table: "Ai_SpecialChapter",
|
|||
|
newName: "IX_Ai_SpecialChapter_SpecialUnitId");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialVideo",
|
|||
|
table: "Ai_SpecialVideo",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialUnit",
|
|||
|
table: "Ai_SpecialUnit",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialExplain",
|
|||
|
table: "Ai_SpecialExplain",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialCourse",
|
|||
|
table: "Ai_SpecialCourse",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialChapter",
|
|||
|
table: "Ai_SpecialChapter",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_Ai_Special",
|
|||
|
table: "Ai_Special",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_Ai_SpecialChapter_Ai_SpecialUnit_SpecialUnitId",
|
|||
|
table: "Ai_SpecialChapter",
|
|||
|
column: "SpecialUnitId",
|
|||
|
principalTable: "Ai_SpecialUnit",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_Ai_SpecialCourse_Ai_SpecialChapter_SpecialChapterId",
|
|||
|
table: "Ai_SpecialCourse",
|
|||
|
column: "SpecialChapterId",
|
|||
|
principalTable: "Ai_SpecialChapter",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_Ai_SpecialExplain_Ai_SpecialCourse_SpecialCourseId",
|
|||
|
table: "Ai_SpecialExplain",
|
|||
|
column: "SpecialCourseId",
|
|||
|
principalTable: "Ai_SpecialCourse",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_Ai_SpecialUnit_Ai_Special_SpecialId",
|
|||
|
table: "Ai_SpecialUnit",
|
|||
|
column: "SpecialId",
|
|||
|
principalTable: "Ai_Special",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_Ai_SpecialVideo_Ai_SpecialExplain_SpecialExplainId",
|
|||
|
table: "Ai_SpecialVideo",
|
|||
|
column: "SpecialExplainId",
|
|||
|
principalTable: "Ai_SpecialExplain",
|
|||
|
principalColumn: "Id");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_Ai_SpecialChapter_Ai_SpecialUnit_SpecialUnitId",
|
|||
|
table: "Ai_SpecialChapter");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_Ai_SpecialCourse_Ai_SpecialChapter_SpecialChapterId",
|
|||
|
table: "Ai_SpecialCourse");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_Ai_SpecialExplain_Ai_SpecialCourse_SpecialCourseId",
|
|||
|
table: "Ai_SpecialExplain");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_Ai_SpecialUnit_Ai_Special_SpecialId",
|
|||
|
table: "Ai_SpecialUnit");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_Ai_SpecialVideo_Ai_SpecialExplain_SpecialExplainId",
|
|||
|
table: "Ai_SpecialVideo");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialVideo",
|
|||
|
table: "Ai_SpecialVideo");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialUnit",
|
|||
|
table: "Ai_SpecialUnit");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialExplain",
|
|||
|
table: "Ai_SpecialExplain");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialCourse",
|
|||
|
table: "Ai_SpecialCourse");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_Ai_SpecialChapter",
|
|||
|
table: "Ai_SpecialChapter");
|
|||
|
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_Ai_Special",
|
|||
|
table: "Ai_Special");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "Ai_SpecialVideo",
|
|||
|
newName: "I_SpecialVideo");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "Ai_SpecialUnit",
|
|||
|
newName: "I_SpecialUnit");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "Ai_SpecialExplain",
|
|||
|
newName: "I_SpecialExplain");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "Ai_SpecialCourse",
|
|||
|
newName: "I_SpecialCourse");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "Ai_SpecialChapter",
|
|||
|
newName: "I_SpecialChapter");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "Ai_Special",
|
|||
|
newName: "I_Special");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_Ai_SpecialVideo_SpecialExplainId",
|
|||
|
table: "I_SpecialVideo",
|
|||
|
newName: "IX_I_SpecialVideo_SpecialExplainId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_Ai_SpecialUnit_SpecialId",
|
|||
|
table: "I_SpecialUnit",
|
|||
|
newName: "IX_I_SpecialUnit_SpecialId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_Ai_SpecialExplain_SpecialCourseId",
|
|||
|
table: "I_SpecialExplain",
|
|||
|
newName: "IX_I_SpecialExplain_SpecialCourseId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_Ai_SpecialCourse_SpecialChapterId",
|
|||
|
table: "I_SpecialCourse",
|
|||
|
newName: "IX_I_SpecialCourse_SpecialChapterId");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_Ai_SpecialChapter_SpecialUnitId",
|
|||
|
table: "I_SpecialChapter",
|
|||
|
newName: "IX_I_SpecialChapter_SpecialUnitId");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_I_SpecialVideo",
|
|||
|
table: "I_SpecialVideo",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_I_SpecialUnit",
|
|||
|
table: "I_SpecialUnit",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_I_SpecialExplain",
|
|||
|
table: "I_SpecialExplain",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_I_SpecialCourse",
|
|||
|
table: "I_SpecialCourse",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_I_SpecialChapter",
|
|||
|
table: "I_SpecialChapter",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_I_Special",
|
|||
|
table: "I_Special",
|
|||
|
column: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_I_SpecialChapter_I_SpecialUnit_SpecialUnitId",
|
|||
|
table: "I_SpecialChapter",
|
|||
|
column: "SpecialUnitId",
|
|||
|
principalTable: "I_SpecialUnit",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_I_SpecialCourse_I_SpecialChapter_SpecialChapterId",
|
|||
|
table: "I_SpecialCourse",
|
|||
|
column: "SpecialChapterId",
|
|||
|
principalTable: "I_SpecialChapter",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_I_SpecialExplain_I_SpecialCourse_SpecialCourseId",
|
|||
|
table: "I_SpecialExplain",
|
|||
|
column: "SpecialCourseId",
|
|||
|
principalTable: "I_SpecialCourse",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_I_SpecialUnit_I_Special_SpecialId",
|
|||
|
table: "I_SpecialUnit",
|
|||
|
column: "SpecialId",
|
|||
|
principalTable: "I_Special",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_I_SpecialVideo_I_SpecialExplain_SpecialExplainId",
|
|||
|
table: "I_SpecialVideo",
|
|||
|
column: "SpecialExplainId",
|
|||
|
principalTable: "I_SpecialExplain",
|
|||
|
principalColumn: "Id");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|