86 lines
2.5 KiB
C#
86 lines
2.5 KiB
C#
![]() |
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace VOL.Core.Migrations
|
|||
|
{
|
|||
|
public partial class _20150226v1 : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Amount",
|
|||
|
table: "S_HomeWork",
|
|||
|
type: "int",
|
|||
|
nullable: false,
|
|||
|
defaultValue: 0,
|
|||
|
comment: "作业数量");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Duration",
|
|||
|
table: "S_HomeWork",
|
|||
|
type: "int",
|
|||
|
nullable: false,
|
|||
|
defaultValue: 0,
|
|||
|
comment: "作业时长");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "GroupNumber",
|
|||
|
table: "S_HomeWork",
|
|||
|
type: "int",
|
|||
|
nullable: false,
|
|||
|
defaultValue: 0,
|
|||
|
comment: "作业数量");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<bool>(
|
|||
|
name: "IsRepeat",
|
|||
|
table: "S_HomeWork",
|
|||
|
type: "bit",
|
|||
|
nullable: false,
|
|||
|
defaultValue: false,
|
|||
|
comment: "是否重复");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<string>(
|
|||
|
name: "RepetitionPeriod",
|
|||
|
table: "S_HomeWork",
|
|||
|
type: "nvarchar(100)",
|
|||
|
nullable: true,
|
|||
|
comment: "重复周期");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<string>(
|
|||
|
name: "WorkTypeName",
|
|||
|
table: "S_HomeWork",
|
|||
|
type: "nvarchar(200)",
|
|||
|
nullable: true,
|
|||
|
comment: "作业类型名称");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "Amount",
|
|||
|
table: "S_HomeWork");
|
|||
|
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "Duration",
|
|||
|
table: "S_HomeWork");
|
|||
|
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "GroupNumber",
|
|||
|
table: "S_HomeWork");
|
|||
|
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "IsRepeat",
|
|||
|
table: "S_HomeWork");
|
|||
|
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "RepetitionPeriod",
|
|||
|
table: "S_HomeWork");
|
|||
|
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "WorkTypeName",
|
|||
|
table: "S_HomeWork");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|