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

@@ -50,24 +50,30 @@ namespace NadekoBot.Migrations
principalTable: "GuildConfigs",
principalColumn: "Id");
migrationBuilder.Sql(@"UPDATE Permissions
SET SecondaryTargetName='ACTUALEXPRESSIONS'
WHERE SecondaryTargetName='ActualCustomReactions' COLLATE NOCASE;");
migrationBuilder.Sql("""
UPDATE Permissions
SET SecondaryTargetName='ACTUALEXPRESSIONS'
WHERE SecondaryTargetName='ActualCustomReactions' COLLATE NOCASE;
""");
migrationBuilder.Sql(@"UPDATE Permissions
SET SecondaryTargetName='EXPRESSIONS'
WHERE SecondaryTargetName='CustomReactions' COLLATE NOCASE;");
migrationBuilder.Sql("""
UPDATE Permissions
SET SecondaryTargetName='EXPRESSIONS'
WHERE SecondaryTargetName='CustomReactions' COLLATE NOCASE;
""");
migrationBuilder.Sql(@"UPDATE Permissions
SET SecondaryTargetName= case lower(SecondaryTargetName)
WHEN 'editcustreact' THEN 'expredit'
WHEN 'delcustreact' THEN 'exprdel'
WHEN 'listcustreact' THEN 'exprlist'
WHEN 'addcustreact' THEN 'expradd'
WHEN 'showcustreact' THEN 'exprshow'
ELSE SecondaryTargetName
END
WHERE lower(SecondaryTargetName) in ('editcustreact', 'delcustreact', 'listcustreact', 'addcustreact', 'showcustreact');");
migrationBuilder.Sql("""
UPDATE Permissions
SET SecondaryTargetName= case lower(SecondaryTargetName)
WHEN 'editcustreact' THEN 'expredit'
WHEN 'delcustreact' THEN 'exprdel'
WHEN 'listcustreact' THEN 'exprlist'
WHEN 'addcustreact' THEN 'expradd'
WHEN 'showcustreact' THEN 'exprshow'
ELSE SecondaryTargetName
END
WHERE lower(SecondaryTargetName) in ('editcustreact', 'delcustreact', 'listcustreact', 'addcustreact', 'showcustreact');
""");
}
protected override void Down(MigrationBuilder migrationBuilder)