46 lines
1.7 KiB
C#
46 lines
1.7 KiB
C#
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
namespace NadekoBot.Migrations
|
|||
|
{
|
|||
|
public partial class repeaternew : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "GuildRepeater",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(nullable: false)
|
|||
|
.Annotation("Sqlite:Autoincrement", true),
|
|||
|
ChannelId = table.Column<ulong>(nullable: false),
|
|||
|
GuildConfigId = table.Column<int>(nullable: true),
|
|||
|
GuildId = table.Column<ulong>(nullable: false),
|
|||
|
Interval = table.Column<TimeSpan>(nullable: false),
|
|||
|
Message = table.Column<string>(nullable: true)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_GuildRepeater", x => x.Id);
|
|||
|
table.ForeignKey(
|
|||
|
name: "FK_GuildRepeater_GuildConfigs_GuildConfigId",
|
|||
|
column: x => x.GuildConfigId,
|
|||
|
principalTable: "GuildConfigs",
|
|||
|
principalColumn: "Id",
|
|||
|
onDelete: ReferentialAction.Restrict);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_GuildRepeater_GuildConfigId",
|
|||
|
table: "GuildRepeater",
|
|||
|
column: "GuildConfigId");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "GuildRepeater");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|