-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDoStuffMigrationPlan.cs
40 lines (35 loc) · 1.3 KB
/
DoStuffMigrationPlan.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
using Umbraco.Cms.Infrastructure.Migrations;
namespace DoStuff.Core.Migrations
{
/// <summary>
/// A Migration plan, tells umbraco how to migrate from
/// one state to another
/// </summary>
/// <remarks>
/// when executed umbraco will look in the UmbracoKeyValue
/// table to work out if there are any existing migrations
/// for your app.
///
/// it then works out how to get from that step to the
/// end of your plan.
/// </remarks>
public class DoStuffMigrationPlan : MigrationPlan
{
public DoStuffMigrationPlan()
: base("DoStuffApplication")
{
// to actually see some of the things run,
// you should comment them in,
// because on a new install things like the index
// and new column are added in the CreateTable Migration
// so the AddColumn and AddIndex migrations run, but
// don't create because they are already there.
From(string.Empty) // nothing installed.
.To<CreateTableMigration>("SimpleTable-Created")
.To<AddColumnMigration>("NewColumn-Added")
.To<AddIndexToTableMigration>("NewIndex-Added")
.To<ExecuteSqlMigration>("CustomSql-Ran");
}
}
}