Updated migration
This commit is contained in:
parent
9a957b95e3
commit
fdc6967bd0
@ -8,7 +8,7 @@ using NadekoBot.Services.Database.Impl;
|
|||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(NadekoSqliteContext))]
|
[DbContext(typeof(NadekoSqliteContext))]
|
||||||
[Migration("20160830011641_first")]
|
[Migration("20160901001820_first")]
|
||||||
partial class first
|
partial class first
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -156,6 +156,30 @@ namespace NadekoBot.Migrations
|
|||||||
b.ToTable("EightBallResponse");
|
b.ToTable("EightBallResponse");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
|
b.Property<ulong>("ChannelId");
|
||||||
|
|
||||||
|
b.Property<int?>("GuildConfigId");
|
||||||
|
|
||||||
|
b.Property<ulong>("GuildId");
|
||||||
|
|
||||||
|
b.Property<bool>("LastStatus");
|
||||||
|
|
||||||
|
b.Property<int>("Type");
|
||||||
|
|
||||||
|
b.Property<string>("Username");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("GuildConfigId");
|
||||||
|
|
||||||
|
b.ToTable("FollowedStream");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b =>
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@ -195,6 +219,8 @@ namespace NadekoBot.Migrations
|
|||||||
|
|
||||||
b.Property<bool>("SendDmGreetMessage");
|
b.Property<bool>("SendDmGreetMessage");
|
||||||
|
|
||||||
|
b.Property<bool>("VoicePlusTextEnabled");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("GuildId")
|
b.HasIndex("GuildId")
|
||||||
@ -360,6 +386,13 @@ namespace NadekoBot.Migrations
|
|||||||
.HasForeignKey("BotConfigId");
|
.HasForeignKey("BotConfigId");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
|
||||||
|
.WithMany("FollowedStreams")
|
||||||
|
.HasForeignKey("GuildConfigId");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b =>
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
|
b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
|
@ -98,7 +98,8 @@ namespace NadekoBot.Migrations
|
|||||||
GuildId = table.Column<ulong>(nullable: false),
|
GuildId = table.Column<ulong>(nullable: false),
|
||||||
SendChannelByeMessage = table.Column<bool>(nullable: false),
|
SendChannelByeMessage = table.Column<bool>(nullable: false),
|
||||||
SendChannelGreetMessage = table.Column<bool>(nullable: false),
|
SendChannelGreetMessage = table.Column<bool>(nullable: false),
|
||||||
SendDmGreetMessage = table.Column<bool>(nullable: false)
|
SendDmGreetMessage = table.Column<bool>(nullable: false),
|
||||||
|
VoicePlusTextEnabled = table.Column<bool>(nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -295,6 +296,30 @@ namespace NadekoBot.Migrations
|
|||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "FollowedStream",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("Autoincrement", true),
|
||||||
|
ChannelId = table.Column<ulong>(nullable: false),
|
||||||
|
GuildConfigId = table.Column<int>(nullable: true),
|
||||||
|
GuildId = table.Column<ulong>(nullable: false),
|
||||||
|
LastStatus = table.Column<bool>(nullable: false),
|
||||||
|
Type = table.Column<int>(nullable: false),
|
||||||
|
Username = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_FollowedStream", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_FollowedStream_GuildConfigs_GuildConfigId",
|
||||||
|
column: x => x.GuildConfigId,
|
||||||
|
principalTable: "GuildConfigs",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_BlacklistItem_BotConfigId",
|
name: "IX_BlacklistItem_BotConfigId",
|
||||||
table: "BlacklistItem",
|
table: "BlacklistItem",
|
||||||
@ -322,6 +347,11 @@ namespace NadekoBot.Migrations
|
|||||||
table: "EightBallResponse",
|
table: "EightBallResponse",
|
||||||
column: "BotConfigId");
|
column: "BotConfigId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_FollowedStream_GuildConfigId",
|
||||||
|
table: "FollowedStream",
|
||||||
|
column: "GuildConfigId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_GuildConfigs_GuildId",
|
name: "IX_GuildConfigs_GuildId",
|
||||||
table: "GuildConfigs",
|
table: "GuildConfigs",
|
||||||
@ -374,7 +404,7 @@ namespace NadekoBot.Migrations
|
|||||||
name: "EightBallResponse");
|
name: "EightBallResponse");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "GuildConfigs");
|
name: "FollowedStream");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "ModulePrefix");
|
name: "ModulePrefix");
|
||||||
@ -400,6 +430,9 @@ namespace NadekoBot.Migrations
|
|||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "ClashOfClans");
|
name: "ClashOfClans");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "GuildConfigs");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "BotConfig");
|
name: "BotConfig");
|
||||||
}
|
}
|
@ -155,6 +155,30 @@ namespace NadekoBot.Migrations
|
|||||||
b.ToTable("EightBallResponse");
|
b.ToTable("EightBallResponse");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
|
b.Property<ulong>("ChannelId");
|
||||||
|
|
||||||
|
b.Property<int?>("GuildConfigId");
|
||||||
|
|
||||||
|
b.Property<ulong>("GuildId");
|
||||||
|
|
||||||
|
b.Property<bool>("LastStatus");
|
||||||
|
|
||||||
|
b.Property<int>("Type");
|
||||||
|
|
||||||
|
b.Property<string>("Username");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("GuildConfigId");
|
||||||
|
|
||||||
|
b.ToTable("FollowedStream");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b =>
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@ -194,6 +218,8 @@ namespace NadekoBot.Migrations
|
|||||||
|
|
||||||
b.Property<bool>("SendDmGreetMessage");
|
b.Property<bool>("SendDmGreetMessage");
|
||||||
|
|
||||||
|
b.Property<bool>("VoicePlusTextEnabled");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("GuildId")
|
b.HasIndex("GuildId")
|
||||||
@ -359,6 +385,13 @@ namespace NadekoBot.Migrations
|
|||||||
.HasForeignKey("BotConfigId");
|
.HasForeignKey("BotConfigId");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig")
|
||||||
|
.WithMany("FollowedStreams")
|
||||||
|
.HasForeignKey("GuildConfigId");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b =>
|
modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
|
b.HasOne("NadekoBot.Services.Database.Models.BotConfig")
|
||||||
|
Loading…
Reference in New Issue
Block a user