<commit_before># encoding: UTF-8
require 'rails/generators/migration'

module Georgia
  module Generators
    class UpgradeGenerator < ::Rails::Generators::Base
      include Rails::Generators::Migration
      source_root File.expand_path('../templates', __FILE__)

      desc "Upgrades Georgia CMS to fit latest changes"

      def self.next_migration_number(dirname)
        Time.now.strftime("%Y%m%d%H%M%S")
      end

      def create_migration
        migration_template "add_type_to_georgia_pages.rb", "db/migrate/add_type_to_georgia_pages.rb"
        migration_template "add_position_to_georgia_widgets.rb", "db/migrate/add_position_to_georgia_widgets.rb"
        migration_template "add_phone_to_georgia_messages.rb", "db/migrate/add_phone_to_georgia_messages.rb"
        migration_template "add_url_to_georgia_pages.rb", "db/migrate/add_url_to_georgia_pages.rb"
      end

    end
  end
end<commit_msg>Run db:migrate & georgia:upgrade rake tasks on georgia:upgrade generator<commit_after># encoding: UTF-8
require 'rails/generators/migration'

module Georgia
  module Generators
    class UpgradeGenerator < ::Rails::Generators::Base
      include Rails::Generators::Migration
      source_root File.expand_path('../templates', __FILE__)

      desc "Upgrades Georgia CMS to fit latest changes"

      def self.next_migration_number(dirname)
        Time.now.strftime("%Y%m%d%H%M%S")
      end

      def create_migration
        migration_template "add_type_to_georgia_pages.rb", "db/migrate/add_type_to_georgia_pages.rb"
        migration_template "add_position_to_georgia_widgets.rb", "db/migrate/add_position_to_georgia_widgets.rb"
        migration_template "add_phone_to_georgia_messages.rb", "db/migrate/add_phone_to_georgia_messages.rb"
        migration_template "add_url_to_georgia_pages.rb", "db/migrate/add_url_to_georgia_pages.rb"
      end

      def migrate
        rake 'db:migrate'
      end

      def upgrade
        rake 'georgia:upgrade'
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.08817635270541083, 'fraction_numerical': 0.001002004008016032, 'mean_word_length': 3.9308641975308642, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5101962', 'n_tokens_mistral': 692, 'n_tokens_neox': 681, 'n_words': 110}