using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace TimetableDesigner.Backend.Services.Authentication.Database.Migrations { /// public partial class Outbox_Pattern_From_Nuget : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Event"); migrationBuilder.CreateTable( name: "Events", columns: table => new { Id = table.Column(type: "uuid", nullable: false), Payload = table.Column(type: "text", nullable: false), PayloadType = table.Column(type: "text", nullable: false), OccuredOn = table.Column(type: "timestamp with time zone", nullable: false), LastRetryOn = table.Column(type: "timestamp with time zone", nullable: true), RetryCount = table.Column(type: "bigint", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Events", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Events_Id", table: "Events", column: "Id", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Events"); migrationBuilder.CreateTable( name: "Event", columns: table => new { Id = table.Column(type: "uuid", nullable: false), OccuredOn = table.Column(type: "timestamp with time zone", nullable: false), Payload = table.Column(type: "text", nullable: false), PayloadType = table.Column(type: "text", nullable: false), ProcessedOn = table.Column(type: "timestamp with time zone", nullable: true), RetryCount = table.Column(type: "bigint", nullable: false), xmin = table.Column(type: "xid", rowVersion: true, nullable: false) }, constraints: table => { table.PrimaryKey("PK_Event", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Event_Id", table: "Event", column: "Id", unique: true); } } }