Skip to content

Commit

Permalink
Adds migration back for v9 for #10450 (#11769)
Browse files Browse the repository at this point in the history
  • Loading branch information
nul800sebastiaan authored Dec 21, 2021
1 parent e5deb7f commit 4240f89
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ protected void DefinePlan()

// TO 9.2.0
To<AddUserGroup2NodeTable>("{0571C395-8F0B-44E9-8E3F-47BDD08D817B}");

To<AddDefaultForNotificationsToggle>("{AD3D3B7F-8E74-45A4-85DB-7FFAD57F9243}");
}
}
}
Original file line number Diff line number Diff line change
@@ -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();
}
}
}

0 comments on commit 4240f89

Please sign in to comment.