forked from webadvanced/Orchard-SiteMap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Migrations.cs
50 lines (44 loc) · 2.13 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System.Data;
using Orchard.Data.Migration;
namespace WebAdvanced.Sitemap {
public class Migrations : DataMigrationImpl {
public int Create() {
SchemaBuilder.CreateTable("SitemapRouteRecord", table => table
.Column<int>("Id", col => col.PrimaryKey().Identity())
.Column<string>("Slug")
.Column<int>("DisplayLevels", col => col.WithDefault(0))
.Column<bool>("Active", col => col.WithDefault(true))
.Column<int>("DisplayColumn", col => col.WithDefault(0))
.Column<int>("Weight", col => col.WithDefault(0))
);
SchemaBuilder.CreateTable("SitemapSettingsRecord", table => table
.Column<int>("Id", col => col.PrimaryKey().Identity())
.Column<string>("ContentType", col => col.Unique())
.Column<bool>("IndexForDisplay", col => col.WithDefault(true))
.Column<bool>("IndexForXml", col => col.WithDefault(true))
.Column<string>("UpdateFrequency")
.Column<int>("Priority")
);
SchemaBuilder.CreateTable("SitemapCustomRouteRecord", table => table
.Column<int>("Id", col => col.PrimaryKey().Identity())
.Column<string>("Url", col => col.Unique())
.Column<bool>("IndexForDisplay", col => col.WithDefault(true))
.Column<bool>("IndexForXml", col => col.WithDefault(true))
.Column<string>("UpdateFrequency")
.Column<int>("Priority")
);
return 2;
}
public int UpdateFrom1() {
SchemaBuilder.CreateTable("SitemapCustomRouteRecord", table => table
.Column<int>("Id", col => col.PrimaryKey().Identity())
.Column<string>("Url", col => col.Unique())
.Column<bool>("IndexForDisplay", col => col.WithDefault(true))
.Column<bool>("IndexForXml", col => col.WithDefault(true))
.Column<string>("UpdateFrequency")
.Column<int>("Priority")
);
return 2;
}
}
}