-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMigrations.cs
36 lines (31 loc) · 1.22 KB
/
Migrations.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
using System;
using Orchard.ContentManagement.MetaData;
using Orchard.Data.Migration;
using Orchard.Disqus.Models;
namespace Orchard.Disqus
{
public class Migrations : DataMigrationImpl
{
public int Create()
{
SchemaBuilder.CreateTable("DisqusThreadMappingRecord",
table => table
.Column<int>("Id", column => column.PrimaryKey().Identity())
.Column<string>("ThreadId")
.Column<int>("ContentId"));
SchemaBuilder.CreateTable("DisqusPostMappingRecord",
table => table
.ContentPartRecord()
.Column<string>("PostId"));
SchemaBuilder.CreateTable("DisqusSettingsRecord",
table => table
.ContentPartRecord()
.Column<string>("ShortName")
.Column<string>("ApiKey")
.Column<DateTime>("SynchronizedAt", column => column.Nullable()));
ContentDefinitionManager.AlterTypeDefinition("Comment",
alteration => alteration.WithPart(typeof(DisqusPostMappingPart).Name));
return 1;
}
}
}