-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSchedulingMigrations.cs
31 lines (28 loc) · 1.05 KB
/
SchedulingMigrations.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
using DQ.Scheduling.Models;
using Orchard.ContentManagement.MetaData;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using Orchard.Environment.Extensions;
using System;
namespace DQ.Scheduling.Migrations {
[OrchardFeature("DQ.Scheduling")]
public class SchedulingMigrations : DataMigrationImpl {
public int Create() {
// Event Definition record table
SchemaBuilder.CreateTable(typeof(SchedulingPartRecord).Name, table => table
.ContentPartRecord()
.Column<string>("TimeZone")
.Column<DateTime>("StartDateTime")
.Column<DateTime>("EndDateTime")
.Column<bool>("IsAllDay")
.Column<bool>("IsRecurring")
);
// Calendar Event part
ContentDefinitionManager.AlterPartDefinition(typeof(SchedulingPart).Name, part => part
.WithDescription("Provides event settings to your content.")
.Attachable()
);
return 1;
}
}
}