2010-06-29 16:17:08 -07:00
|
|
|
|
using Orchard.Data.Migration;
|
|
|
|
|
|
|
|
|
|
namespace Orchard.Blogs.DataMigrations {
|
|
|
|
|
public class BlogsDataMigration : DataMigrationImpl {
|
|
|
|
|
|
|
|
|
|
public int Create() {
|
|
|
|
|
//CREATE TABLE Orchard_Blogs_BlogArchiveRecord (Id integer, Year INTEGER, Month INTEGER, PostCount INTEGER, Blog_id INTEGER, primary key (Id));
|
|
|
|
|
SchemaBuilder.CreateTable("BlogArchiveRecord", table => table
|
2010-07-08 15:18:13 -07:00
|
|
|
|
.Column<int>("Id", column => column.PrimaryKey().Identity())
|
2010-06-29 16:17:08 -07:00
|
|
|
|
.Column<int>("Year")
|
|
|
|
|
.Column<int>("Month")
|
|
|
|
|
.Column<int>("PostCount")
|
|
|
|
|
.Column<int>("Blog_id")
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
//CREATE TABLE Orchard_Blogs_BlogRecord (Id INTEGER not null, Description TEXT, PostCount INTEGER, primary key (Id));
|
|
|
|
|
SchemaBuilder.CreateTable("BlogRecord", table => table
|
2010-07-08 15:18:13 -07:00
|
|
|
|
.ContentPartRecord()
|
2010-06-29 16:17:08 -07:00
|
|
|
|
.Column<string>("Description")
|
|
|
|
|
.Column<int>("PostCount")
|
|
|
|
|
);
|
|
|
|
|
|
2010-07-19 15:39:58 -07:00
|
|
|
|
return 1;
|
2010-06-29 16:17:08 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|