gehgassi_backend/gehGassi.Persistence/Migrations/20221125125712_SystemMessagesAdded.cs

53 lines
2.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace gehGassi.Persistence.Migrations
{
/// <inheritdoc />
public partial class SystemMessagesAdded : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "SystemMessages",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
AppUserId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Key = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Table = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Type = table.Column<int>(type: "int", nullable: false),
Message = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Expires = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
Read = table.Column<bool>(type: "bit", nullable: false),
ReadDate = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
Created = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
Index = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Version = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true),
UpdatedAt = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
Deleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SystemMessages", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_SystemMessages_Index",
table: "SystemMessages",
column: "Index");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SystemMessages");
}
}
}