using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections.Generic; namespace Winsoft.GOV.XF.WebApi.WXCore.Migrations { public partial class AddCreatDate : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "CreateDate", table: "WXUser", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AddColumn( name: "CreateDate", table: "Bundle", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); migrationBuilder.AddColumn( name: "UserId", table: "Bundle", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "CreateDate", table: "Asset", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "CreateDate", table: "WXUser"); migrationBuilder.DropColumn( name: "CreateDate", table: "Bundle"); migrationBuilder.DropColumn( name: "UserId", table: "Bundle"); migrationBuilder.DropColumn( name: "CreateDate", table: "Asset"); } } }