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