1
Vote

For the fork stanleygoldman, missing update in migration.cs

description

using System;
using Orchard.Data.Migration;

namespace Contrib.GoogleAnalytics {
public class Migrations : DataMigrationImpl
{
    public int Create()
    {
        SchemaBuilder.CreateTable("SettingsRecord",
            table => table
                .Column<int>("Id", column => column.PrimaryKey().Identity())
                .Column<bool>("Enable", column => column.NotNull().WithDefault(false))
                .Column<bool>("IncludeInHead", column => column.NotNull().WithDefault(false))
                .Column<string>("Script", column => column.NotNull().Unlimited().WithDefault(""))
            );

        return 1;
    }

    public int UpdateFrom1()
    {
        SchemaBuilder.AlterTable("SettingsRecord",
            table => table
                .AddColumn<bool>("IncludeInHead", column => column.NotNull().WithDefault(false))
        return 2;
    }
}
}

comments

StanleyGoldman wrote Apr 27, 2013 at 6:17 PM

It seems to be that bgrabkowitz made a mistake when adding his change to my fork, if you look in the code you posted, the initial migration was modified to add the column.

I gave you access to my fork, if you'd like to push the fix into it.

CSADNT wrote Apr 28, 2013 at 7:23 AM

Ok, I will be glad to help ... positively :)