2013-05-25 08:16:57 +08:00
|
|
|
|
using Orchard.Data.Migration;
|
|
|
|
|
|
|
|
|
|
namespace Orchard.OutputCache {
|
|
|
|
|
public class Migrations : DataMigrationImpl {
|
|
|
|
|
public int Create() {
|
2013-11-01 05:49:44 +08:00
|
|
|
|
|
2013-05-25 08:16:57 +08:00
|
|
|
|
SchemaBuilder.CreateTable("CacheParameterRecord",
|
|
|
|
|
table => table
|
|
|
|
|
.Column<int>("Id", c => c.PrimaryKey().Identity())
|
|
|
|
|
.Column<int>("Duration")
|
|
|
|
|
.Column<int>("MaxAge")
|
|
|
|
|
.Column<string>("RouteKey", c => c.WithLength(255))
|
|
|
|
|
);
|
|
|
|
|
|
2013-08-24 03:49:58 +08:00
|
|
|
|
return 6;
|
2013-05-25 08:16:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int UpdateFrom1() {
|
|
|
|
|
SchemaBuilder.CreateTable("CacheParameterRecord",
|
|
|
|
|
table => table
|
|
|
|
|
.Column<int>("Id", c => c.PrimaryKey().Identity())
|
|
|
|
|
.Column<int>("Duration")
|
|
|
|
|
.Column<string>("RouteKey", c => c.WithLength(255))
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int UpdateFrom2() {
|
|
|
|
|
return 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int UpdateFrom3() {
|
|
|
|
|
|
|
|
|
|
SchemaBuilder.AlterTable("CacheParameterRecord",
|
|
|
|
|
table => table
|
|
|
|
|
.AddColumn<int>("MaxAge")
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int UpdateFrom4() {
|
|
|
|
|
return 5;
|
|
|
|
|
}
|
2013-08-24 03:49:58 +08:00
|
|
|
|
|
|
|
|
|
public int UpdateFrom5() {
|
|
|
|
|
return 6;
|
|
|
|
|
}
|
2013-05-25 08:16:57 +08:00
|
|
|
|
}
|
|
|
|
|
}
|