0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-07-02 03:22:57 +00:00
CleanArchitecture/CleanArchitecture.Infrastructure/Migrations/DomainNotificationStoreDb/20230701135523_AddDomainNotificationStore.cs
Alexander Konietzko 53e0966f51
Add event sourcing
2023-07-01 16:46:08 +02:00

44 lines
2.0 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CleanArchitecture.Infrastructure.Migrations.DomainNotificationStoreDb
{
/// <inheritdoc />
public partial class AddDomainNotificationStore : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "StoredDomainNotifications",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Data = table.Column<string>(type: "nvarchar(max)", nullable: false),
User = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
CorrelationId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
AggregateId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
MessageType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Timestamp = table.Column<DateTime>(type: "datetime2", nullable: false),
Key = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Value = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Version = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_StoredDomainNotifications", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "StoredDomainNotifications");
}
}
}