using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace API.Migrations.notifications { /// public partial class Initial : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterDatabase() .Annotation("Npgsql:PostgresExtension:hstore", ",,"); migrationBuilder.CreateTable( name: "NotificationConnectors", columns: table => new { Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), Url = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), Headers = table.Column>(type: "hstore", nullable: false), HttpMethod = table.Column(type: "character varying(8)", maxLength: 8, nullable: false), Body = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false) }, constraints: table => { table.PrimaryKey("PK_NotificationConnectors", x => x.Name); }); migrationBuilder.CreateTable( name: "Notifications", columns: table => new { NotificationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), Urgency = table.Column(type: "smallint", nullable: false), Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), Message = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), Date = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Notifications", x => x.NotificationId); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "NotificationConnectors"); migrationBuilder.DropTable( name: "Notifications"); } } }