api บันทึกเครื่องราช
This commit is contained in:
parent
9abb9c5422
commit
51bdcf4041
50 changed files with 162548 additions and 111 deletions
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableRetirementaddfiledoc : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DocumentId",
|
||||
table: "RetirementPeriods",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DocumentId",
|
||||
table: "RetirementPeriodHistorys",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RetirementPeriods_DocumentId",
|
||||
table: "RetirementPeriods",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RetirementPeriodHistorys_DocumentId",
|
||||
table: "RetirementPeriodHistorys",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RetirementPeriodHistorys_Documents_DocumentId",
|
||||
table: "RetirementPeriodHistorys",
|
||||
column: "DocumentId",
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RetirementPeriods_Documents_DocumentId",
|
||||
table: "RetirementPeriods",
|
||||
column: "DocumentId",
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_RetirementPeriodHistorys_Documents_DocumentId",
|
||||
table: "RetirementPeriodHistorys");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_RetirementPeriods_Documents_DocumentId",
|
||||
table: "RetirementPeriods");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_RetirementPeriods_DocumentId",
|
||||
table: "RetirementPeriods");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_RetirementPeriodHistorys_DocumentId",
|
||||
table: "RetirementPeriodHistorys");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DocumentId",
|
||||
table: "RetirementPeriods");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DocumentId",
|
||||
table: "RetirementPeriodHistorys");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue