mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-03 00:04:28 -05:00
Added automatic permissions migration for more renamed customreaction commands
This commit is contained in:
@@ -57,6 +57,17 @@ WHERE SecondaryTargetName='ActualCustomReactions' 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');");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
|
||||
@@ -1256,6 +1256,7 @@ expredit:
|
||||
- expredit
|
||||
- exe
|
||||
- exedit
|
||||
- ecr
|
||||
exprsimport:
|
||||
- eximport
|
||||
exprsexport:
|
||||
|
||||
Reference in New Issue
Block a user