-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCssMigrations.cs
37 lines (31 loc) · 1.05 KB
/
CssMigrations.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.Data;
using Orchard.ContentManagement.MetaData;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
namespace Contrib.Ace
{
public class CssMigrations : DataMigrationImpl
{
public int Create()
{
SchemaBuilder.CreateTable(
"CssPartRecord",
table => table
.ContentPartRecord()
.Column<string>("Css", column => column.Unlimited())
);
ContentDefinitionManager.AlterPartDefinition("CssPart", builder => builder
.Attachable()
.WithDescription("Allows the inline editing of Css using Ace editor."));
ContentDefinitionManager.AlterTypeDefinition("HtmlWidget",
cfg => cfg
.WithPart("CssPart")
);
ContentDefinitionManager.AlterTypeDefinition("Page",
cfg => cfg
.WithPart("CssPart")
);
return 1;
}
}
}