Sha256: c80611f1f2a65abd15babaa8ba2ce9de5631aa0a1cd93dd0894b79a87de57475

Contents?: true

Size: 526 Bytes

Versions: 21

Compression:

Stored size: 526 Bytes

Contents

require "rails/generators/active_record"

module Pghero
  module Generators
    class QueryStatsGenerator < Rails::Generators::Base
      include ActiveRecord::Generators::Migration
      source_root File.join(__dir__, "templates")

      def copy_migration
        migration_template "query_stats.rb", "db/migrate/create_pghero_query_stats.rb", migration_version: migration_version
      end

      def migration_version
        "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
pghero-3.2.0 lib/generators/pghero/query_stats_generator.rb
pghero-3.1.0 lib/generators/pghero/query_stats_generator.rb
pghero-3.0.1 lib/generators/pghero/query_stats_generator.rb
pghero-3.0.0 lib/generators/pghero/query_stats_generator.rb
pghero-2.8.3 lib/generators/pghero/query_stats_generator.rb
pghero-2.8.2 lib/generators/pghero/query_stats_generator.rb
pghero-2.8.1 lib/generators/pghero/query_stats_generator.rb
pghero-2.8.0 lib/generators/pghero/query_stats_generator.rb
pghero-2.7.4 lib/generators/pghero/query_stats_generator.rb
pghero_fork-2.7.3 lib/generators/pghero/query_stats_generator.rb
pghero-2.7.3 lib/generators/pghero/query_stats_generator.rb
pghero-2.7.2 lib/generators/pghero/query_stats_generator.rb
pghero-2.7.1 lib/generators/pghero/query_stats_generator.rb
pghero-2.7.0 lib/generators/pghero/query_stats_generator.rb
pghero-2.6.0 lib/generators/pghero/query_stats_generator.rb
pghero-2.5.1 lib/generators/pghero/query_stats_generator.rb
pghero-2.5.0 lib/generators/pghero/query_stats_generator.rb
pghero-2.4.2 lib/generators/pghero/query_stats_generator.rb
pghero-2.4.1 lib/generators/pghero/query_stats_generator.rb
pghero-2.4.0 lib/generators/pghero/query_stats_generator.rb