-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
e5deb7f
commit 4240f89
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_2_0/AddDefaultForNotificationsToggle.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |