mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-20 00:16:37 +08:00
88 lines
2.6 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|