2016-12-17 00:16:14 +00:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
2016-12-13 03:49:44 +00:00
|
|
|
|
|
|
|
|
|
namespace NadekoBot.Migrations
|
|
|
|
|
{
|
|
|
|
|
public partial class mutedusers : Migration
|
|
|
|
|
{
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "MutedUserId",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<int>(nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
GuildConfigId = table.Column<int>(nullable: true),
|
|
|
|
|
UserId = table.Column<ulong>(nullable: false)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_MutedUserId", x => x.Id);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_MutedUserId_GuildConfigs_GuildConfigId",
|
|
|
|
|
column: x => x.GuildConfigId,
|
|
|
|
|
principalTable: "GuildConfigs",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_MutedUserId_GuildConfigId",
|
|
|
|
|
table: "MutedUserId",
|
|
|
|
|
column: "GuildConfigId");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "MutedUserId");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|