committed by
GitHub
parent
e5deb7fe8c
commit
4240f89534
@@ -267,7 +267,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade
|
||||
|
||||
// TO 9.2.0
|
||||
To<AddUserGroup2NodeTable>("{0571C395-8F0B-44E9-8E3F-47BDD08D817B}");
|
||||
|
||||
To<AddDefaultForNotificationsToggle>("{AD3D3B7F-8E74-45A4-85DB-7FFAD57F9243}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using Umbraco.Cms.Core;
|
||||
|
||||
namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_2_0
|
||||
{
|
||||
public class AddDefaultForNotificationsToggle : MigrationBase
|
||||
{
|
||||
public AddDefaultForNotificationsToggle(IMigrationContext context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void Migrate()
|
||||
{
|
||||
var updateSQL = Sql($"UPDATE {Constants.DatabaseSchema.Tables.UserGroup} SET userGroupDefaultPermissions = userGroupDefaultPermissions + 'N' WHERE userGroupAlias IN ('admin', 'writer', 'editor')");
|
||||
Execute.Sql(updateSQL.SQL).Do();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user