mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
- Generator will now also add [NadekoDescription] attribute to commands
- CustomReactions module (and customreactions db table) renamed to Expressions. This was done to remove confusion about how it relates to discord Reactions (it doesn't, it was created and named before discord reactions existed) - Permissionv2 db table renamed to Permissions - Expression command now start with ex/expr and end with the name of the action or setting. For example .exd is expression delete - CommandStrings will now use methodname as the key, and not the command name (first entry in aliases.yml). In other words aliases.yml and commands.en-US.yml will use the same keys (once again).
This commit is contained in:
2726
src/NadekoBot/Migrations/20220102102344_crs-rename-to-expressions-perm-rename.Designer.cs
generated
Normal file
2726
src/NadekoBot/Migrations/20220102102344_crs-rename-to-expressions-perm-rename.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,103 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class crsrenametoexpressionspermrename : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Permissionv2_GuildConfigs_GuildConfigId",
|
||||
table: "Permissionv2");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Permissionv2",
|
||||
table: "Permissionv2");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_CustomReactions",
|
||||
table: "CustomReactions");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Permissionv2",
|
||||
newName: "Permissions");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "CustomReactions",
|
||||
newName: "Expressions");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Permissionv2_GuildConfigId",
|
||||
table: "Permissions",
|
||||
newName: "IX_Permissions_GuildConfigId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Permissions",
|
||||
table: "Permissions",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Expressions",
|
||||
table: "Expressions",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Permissions_GuildConfigs_GuildConfigId",
|
||||
table: "Permissions",
|
||||
column: "GuildConfigId",
|
||||
principalTable: "GuildConfigs",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.Sql(@"UPDATE Permissions
|
||||
SET SecondaryTargetName='ACTUALEXPRESSIONS'
|
||||
WHERE SecondaryTargetName='ActualCustomReactions' COLLATE NOCASE;");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Permissions_GuildConfigs_GuildConfigId",
|
||||
table: "Permissions");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Permissions",
|
||||
table: "Permissions");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Expressions",
|
||||
table: "Expressions");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Permissions",
|
||||
newName: "Permissionv2");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Expressions",
|
||||
newName: "CustomReactions");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Permissions_GuildConfigId",
|
||||
table: "Permissionv2",
|
||||
newName: "IX_Permissionv2_GuildConfigId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Permissionv2",
|
||||
table: "Permissionv2",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_CustomReactions",
|
||||
table: "CustomReactions",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Permissionv2_GuildConfigs_GuildConfigId",
|
||||
table: "Permissionv2",
|
||||
column: "GuildConfigId",
|
||||
principalTable: "GuildConfigs",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
@@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using NadekoBot.Services.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
[DbContext(typeof(NadekoContext))]
|
||||
@@ -13,8 +15,7 @@ namespace NadekoBot.Migrations
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "5.0.8");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
@@ -549,7 +550,7 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CustomReactions");
|
||||
b.ToTable("Expressions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.DelMsgOnCmdChannel", b =>
|
||||
@@ -681,28 +682,6 @@ namespace NadekoBot.Migrations
|
||||
b.ToTable("FilterChannelId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<ulong>("ChannelId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GuildConfigId");
|
||||
|
||||
b.ToTable("FilterLinksChannelId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -725,6 +704,28 @@ namespace NadekoBot.Migrations
|
||||
b.ToTable("FilteredWord");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<ulong>("ChannelId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GuildConfigId");
|
||||
|
||||
b.ToTable("FilterLinksChannelId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1177,7 +1178,7 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.HasIndex("GuildConfigId");
|
||||
|
||||
b.ToTable("Permissionv2");
|
||||
b.ToTable("Permissions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.PlantedCurrency", b =>
|
||||
@@ -2311,13 +2312,6 @@ namespace NadekoBot.Migrations
|
||||
.HasForeignKey("GuildConfigId1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilterLinksChannelIds")
|
||||
.HasForeignKey("GuildConfigId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
@@ -2325,6 +2319,13 @@ namespace NadekoBot.Migrations
|
||||
.HasForeignKey("GuildConfigId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilterLinksChannelIds")
|
||||
.HasForeignKey("GuildConfigId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig")
|
||||
@@ -2629,14 +2630,14 @@ namespace NadekoBot.Migrations
|
||||
|
||||
b.Navigation("FeedSubs");
|
||||
|
||||
b.Navigation("FilteredWords");
|
||||
|
||||
b.Navigation("FilterInvitesChannelIds");
|
||||
|
||||
b.Navigation("FilterLinksChannelIds");
|
||||
|
||||
b.Navigation("FilterWordsChannelIds");
|
||||
|
||||
b.Navigation("FilteredWords");
|
||||
|
||||
b.Navigation("FollowedStreams");
|
||||
|
||||
b.Navigation("GenerateCurrencyChannelIds");
|
||||
|
Reference in New Issue
Block a user