Make extensive use of raw string literals C#11 feature

This commit is contained in:
Kwoth
2023-01-21 01:12:11 +01:00
parent 0fe4f14d96
commit 63a9ae2dac
32 changed files with 756 additions and 587 deletions

View File

@@ -9,19 +9,21 @@ namespace NadekoBot.Migrations
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(@"UPDATE Clubs
SET Name = Name || '#' || Discrim
WHERE Discrim <> 1;
UPDATE Clubs as co
SET Name =
CASE (select count(*) from Clubs as ci where co.Name == ci.Name) = 1
WHEN true
THEN Name
ELSE
Name || '#' || Discrim
END
WHERE Discrim = 1;");
migrationBuilder.Sql("""
UPDATE Clubs
SET Name = Name || '#' || Discrim
WHERE Discrim <> 1;
UPDATE Clubs as co
SET Name =
CASE (select count(*) from Clubs as ci where co.Name == ci.Name) = 1
WHEN true
THEN Name
ELSE
Name || '#' || Discrim
END
WHERE Discrim = 1;
""");
migrationBuilder.DropForeignKey(
name: "FK_Clubs_DiscordUser_OwnerId",