using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace vassago.Migrations { /// public partial class WebhookObjects : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Webhooks", columns: table => new { Id = table.Column(type: "uuid", nullable: false), UacId = table.Column(type: "uuid", nullable: true), Trigger = table.Column(type: "text", nullable: true), Uri = table.Column(type: "text", nullable: true), Method = table.Column(type: "integer", nullable: false), Headers = table.Column>(type: "text[]", nullable: true), Content = table.Column(type: "text", nullable: true), Description = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Webhooks", x => x.Id); table.ForeignKey( name: "FK_Webhooks_UACs_UacId", column: x => x.UacId, principalTable: "UACs", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_Webhooks_UacId", table: "Webhooks", column: "UacId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Webhooks"); } } }