using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace asg_form.Migrations { /// public partial class qqbot1 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "CreationTime", table: "AspNetUsers"); migrationBuilder.AddColumn( name: "com_limit", table: "F_game", type: "integer", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "judge", table: "F_game", type: "text", nullable: true); migrationBuilder.AddColumn( name: "person_type", table: "F_game", type: "text", nullable: true); migrationBuilder.CreateTable( name: "T_Task", columns: table => new { id = table.Column(type: "bigint", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), chinaname = table.Column(type: "text", nullable: false), createPerson = table.Column(type: "text", nullable: false), createUserId = table.Column(type: "bigint", nullable: true), userId = table.Column(type: "bigint", nullable: false), taskName = table.Column(type: "text", nullable: false), taskDescription = table.Column(type: "text", nullable: false), status = table.Column(type: "text", nullable: false), money = table.Column(type: "bigint", nullable: false), createTime = table.Column(type: "text", nullable: false), lastOperateTime = table.Column(type: "text", nullable: false), approvalPerson = table.Column(type: "text", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_Task", x => x.id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "T_Task"); migrationBuilder.DropColumn( name: "com_limit", table: "F_game"); migrationBuilder.DropColumn( name: "judge", table: "F_game"); migrationBuilder.DropColumn( name: "person_type", table: "F_game"); migrationBuilder.AddColumn( name: "CreationTime", table: "AspNetUsers", type: "timestamp with time zone", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); } } }