Files
Yi.Admin/Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.cs
2021-10-20 15:40:19 +08:00

88 lines
2.6 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace Yi.Framework.Model.Migrations
{
public partial class yi3 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "address",
table: "user",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "phone",
table: "user",
type: "INTEGER",
nullable: true);
migrationBuilder.AlterColumn<int>(
name: "sort",
table: "menu",
type: "INTEGER",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "INTEGER",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "is_top",
table: "menu",
type: "INTEGER",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "INTEGER",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "is_show",
table: "menu",
type: "INTEGER",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "INTEGER",
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "address",
table: "user");
migrationBuilder.DropColumn(
name: "phone",
table: "user");
migrationBuilder.AlterColumn<int>(
name: "sort",
table: "menu",
type: "INTEGER",
nullable: true,
oldClrType: typeof(int),
oldType: "INTEGER");
migrationBuilder.AlterColumn<int>(
name: "is_top",
table: "menu",
type: "INTEGER",
nullable: true,
oldClrType: typeof(int),
oldType: "INTEGER");
migrationBuilder.AlterColumn<int>(
name: "is_show",
table: "menu",
type: "INTEGER",
nullable: true,
oldClrType: typeof(int),
oldType: "INTEGER");
}
}
}