using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace UserPointManagement.Persistence.Migrations { public partial class AddUserPoint : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "user_point", columns: table => new { id = table.Column(type: "bigint", nullable: false, comment: "主键") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), user_id = table.Column(type: "integer", nullable: false, comment: "用户Id"), point = table.Column(type: "integer", nullable: false, comment: "积分"), create_time = table.Column(type: "timestamp with time zone", nullable: false, comment: "新增时间") }, constraints: table => { table.PrimaryKey("pk_user_point", x => x.id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "user_point"); } } }