First Initial
This commit is contained in:
69
Migrations/25630110105729_NewLevel.cs
Normal file
69
Migrations/25630110105729_NewLevel.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class NewLevel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_level_score",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
code = table.Column<string>(maxLength: 255, nullable: true),
|
||||
detail = table.Column<string>(maxLength: 1000, nullable: true),
|
||||
max_score = table.Column<decimal>(nullable: true),
|
||||
min_score = table.Column<decimal>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_level_score", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_promoted_percentage",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
level_score_id = table.Column<Guid>(nullable: true),
|
||||
code = table.Column<string>(maxLength: 255, nullable: true),
|
||||
detail = table.Column<string>(maxLength: 1000, nullable: true),
|
||||
promoted_percentage = table.Column<decimal>(nullable: true),
|
||||
max_score = table.Column<decimal>(nullable: true),
|
||||
min_score = table.Column<decimal>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_promoted_percentage", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_promoted_percentage_eva_level_score_level_score_id",
|
||||
column: x => x.level_score_id,
|
||||
principalTable: "eva_level_score",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_promoted_percentage_level_score_id",
|
||||
table: "eva_promoted_percentage",
|
||||
column: "level_score_id");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_promoted_percentage");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_level_score");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user