mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Refactored data migration to correct SQL Server bugs
- Added explicit Identity column specification - Defined string lengths explicitly on needed columns --HG-- branch : dev
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Orchard.Blogs.DataMigrations {
|
||||
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
|
||||
.Column<int>("Id", column => column.PrimaryKey())
|
||||
.Column<int>("Id", column => column.PrimaryKey().Identity())
|
||||
.Column<int>("Year")
|
||||
.Column<int>("Month")
|
||||
.Column<int>("PostCount")
|
||||
@@ -15,7 +15,7 @@ namespace Orchard.Blogs.DataMigrations {
|
||||
|
||||
//CREATE TABLE Orchard_Blogs_BlogRecord (Id INTEGER not null, Description TEXT, PostCount INTEGER, primary key (Id));
|
||||
SchemaBuilder.CreateTable("BlogRecord", table => table
|
||||
.Column<int>("Id", column => column.PrimaryKey())
|
||||
.ContentPartRecord()
|
||||
.Column<string>("Description")
|
||||
.Column<int>("PostCount")
|
||||
);
|
||||
|
Reference in New Issue
Block a user