<commit_before>﻿using System;
using System.Collections.Generic;
using System.Data;
using Orchard.ContentManagement.Drivers;
using Orchard.ContentManagement.MetaData;
using Orchard.ContentManagement.MetaData.Builders;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using Orchard.Environment.Extensions;

namespace LccNetwork.Migrations
{
    [OrchardFeature("fea")]
    public class NavigationMigrations : DataMigrationImpl
    {
        public int Create()
        {
            return 1;
        }

        public int UpdateFrom1()
        {
            return 2;
        }

        public int UpdateFrom2()
        {
            ContentDefinitionManager.AlterTypeDefinition("SectionMenu",
                    cfg => cfg
                    .WithPart("CommonPart")
                    .WithPart("IdentityPart")
                    .WithPart("WidgetPart")
                    .WithPart("MenuWidgetPart") // why cannot we add MenuWidgetPart through the UI?
                    .WithSetting("Stereotype", "Widget")
                );

            return 3;
        }
    }
}<commit_msg>Add a footer navigation widget.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Data;
using Orchard.ContentManagement.Drivers;
using Orchard.ContentManagement.MetaData;
using Orchard.ContentManagement.MetaData.Builders;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using Orchard.Environment.Extensions;

namespace LccNetwork.Migrations
{
    [OrchardFeature("SectionNavigation")]
    public class NavigationMigrations : DataMigrationImpl
    {
        public int Create()
        {
            return 1;
        }

        public int UpdateFrom1()
        {
            return 2;
        }

        public int UpdateFrom2()
        {
            ContentDefinitionManager.AlterTypeDefinition("SectionMenu",
                    cfg => cfg
                    .WithPart("CommonPart")
                    .WithPart("IdentityPart")
                    .WithPart("WidgetPart")
                    .WithPart("MenuWidgetPart") // why cannot we add MenuWidgetPart through the UI?
                    .WithSetting("Stereotype", "Widget")
                );

            return 4;
        }

        public int UpdateFrom4()
        {
            ContentDefinitionManager.AlterTypeDefinition("FooterMenu",
                    cfg => cfg
                    .WithPart("CommonPart")
                    .WithPart("IdentityPart")
                    .WithPart("WidgetPart")
                    .WithPart("MenuWidgetPart") // why cannot we add MenuWidgetPart through the UI?
                    .WithSetting("Stereotype", "Widget")
                );

            return 5;
        }
    }
}
{'fraction_non_alphanumeric': 0.08775137111517367, 'fraction_numerical': 0.0043875685557586835, 'mean_word_length': 1.8177136972193615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2020432', 'n_tokens_mistral': 704, 'n_tokens_neox': 655, 'n_words': 143}