using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace AutoDispathingWork.Migrations { /// public partial class dbv2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "SmsSendRecords", columns: table => new { Id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), RefrenceId = table.Column(type: "text", nullable: false), PhoneNumber = table.Column(type: "text", nullable: false), Content = table.Column(type: "text", nullable: false), SendTime = table.Column(type: "timestamp with time zone", nullable: false), IsSuccess = table.Column(type: "boolean", nullable: false), ErrorMessage = table.Column(type: "text", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SmsSendRecords", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_SmsSendRecords_SendTime", table: "SmsSendRecords", column: "SendTime"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "SmsSendRecords"); } } }