Skip to content

Commit 4e534e0

Browse files
committed
- Migrate FileEditor page layout to FullWorksurface
1 parent 45478bc commit 4e534e0

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// <copyright>
2+
// Copyright by the Spark Development Network
3+
//
4+
// Licensed under the Rock Community License (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.rockrms.com/license
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
// </copyright>
16+
17+
namespace Rock.Plugin.HotFixes
18+
{
19+
/// <summary>
20+
/// Plug-in migration
21+
/// </summary>
22+
/// <seealso cref="Migration" />
23+
[MigrationNumber( 272, "19.0" )]
24+
public class UpdateFileEditorPageLayout : Migration
25+
{
26+
/// <summary>
27+
/// Operations to be performed during the upgrade process.
28+
/// </summary>
29+
public override void Up()
30+
{
31+
UpdateFileEditorPage();
32+
}
33+
34+
/// <summary>
35+
/// Operations to be performed during the downgrade process.
36+
/// </summary>
37+
public override void Down()
38+
{
39+
40+
}
41+
42+
private void UpdateFileEditorPage()
43+
{
44+
Sql( @"
45+
UPDATE dbo.[Page]
46+
SET [LayoutId] = (
47+
SELECT [Id]
48+
FROM dbo.[Layout]
49+
WHERE [Guid] = 'C2467799-BB45-4251-8EE6-F0BF27201535'
50+
)
51+
WHERE [Guid] = '053C3F1D-8BF2-48B2-A8E6-55184F8A87F4';
52+
" );
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)