AutoDispatching/AutoDispathingWork/Migrations/20240810152436_dbv2.cs
2024-08-10 23:43:46 +08:00

47 lines
1.8 KiB
C#

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