gehgassi_backend/gehGassi.Persistence/Migrations/20230511141434_SystemMessagesToSendAdded.cs

52 lines
2.6 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace gehGassi.Persistence.Migrations
{
/// <inheritdoc />
public partial class SystemMessagesToSendAdded : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "SystemMessagesToSend",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Message = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
AppUserCount = table.Column<int>(type: "int", nullable: false),
SentCount = table.Column<int>(type: "int", nullable: false),
ToSendDate = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
HasBeenSent = table.Column<bool>(type: "bit", nullable: false),
SentDate = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
SentBy = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
AppUserType = table.Column<int>(type: "int", nullable: false),
Country = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
State = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
City = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Zip = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
VerifiedOnly = table.Column<bool>(type: "bit", nullable: false),
Sex = table.Column<int>(type: "int", nullable: true),
Created = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SystemMessagesToSend", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SystemMessagesToSend");
}
}
}