forked from adam/discord-bot-shtik
All checks were successful
gitea.arg.rip/vassago/pipeline/head This commit looks good
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace vassago.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class WebhookObjects : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Webhooks",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
UacId = table.Column<Guid>(type: "uuid", nullable: true),
|
|
Trigger = table.Column<string>(type: "text", nullable: true),
|
|
Uri = table.Column<string>(type: "text", nullable: true),
|
|
Method = table.Column<int>(type: "integer", nullable: false),
|
|
Headers = table.Column<List<string>>(type: "text[]", nullable: true),
|
|
Content = table.Column<string>(type: "text", nullable: true),
|
|
Description = table.Column<string>(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");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Webhooks");
|
|
}
|
|
}
|
|
}
|