migrate db
This commit is contained in:
parent
30ff1ae15c
commit
1e5676e8ab
6 changed files with 25936 additions and 0 deletions
|
|
@ -0,0 +1,198 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class update_table_discipline_add_dna : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1DnaId",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1Id",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2DnaId",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2Id",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3DnaId",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3Id",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4DnaId",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4Id",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "root",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootDnaId",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootId",
|
||||
table: "DisciplineComplaint_Appeals",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1DnaId",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1Id",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2DnaId",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2Id",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3DnaId",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3Id",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4DnaId",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4Id",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "root",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootDnaId",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootId",
|
||||
table: "DisciplineComplaint_Appeals");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue