Sha256: f106472deaf9418c8835cc32935728f3aab7ab1c122f2bd351f071e193d349ca

Contents?: true

Size: 526 Bytes

Versions: 21

Compression:

Stored size: 526 Bytes

Contents

require "rails/generators/active_record"

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

      def copy_migration
        migration_template "space_stats.rb", "db/migrate/create_pghero_space_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/space_stats_generator.rb
pghero-3.1.0 lib/generators/pghero/space_stats_generator.rb
pghero-3.0.1 lib/generators/pghero/space_stats_generator.rb
pghero-3.0.0 lib/generators/pghero/space_stats_generator.rb
pghero-2.8.3 lib/generators/pghero/space_stats_generator.rb
pghero-2.8.2 lib/generators/pghero/space_stats_generator.rb
pghero-2.8.1 lib/generators/pghero/space_stats_generator.rb
pghero-2.8.0 lib/generators/pghero/space_stats_generator.rb
pghero-2.7.4 lib/generators/pghero/space_stats_generator.rb
pghero_fork-2.7.3 lib/generators/pghero/space_stats_generator.rb
pghero-2.7.3 lib/generators/pghero/space_stats_generator.rb
pghero-2.7.2 lib/generators/pghero/space_stats_generator.rb
pghero-2.7.1 lib/generators/pghero/space_stats_generator.rb
pghero-2.7.0 lib/generators/pghero/space_stats_generator.rb
pghero-2.6.0 lib/generators/pghero/space_stats_generator.rb
pghero-2.5.1 lib/generators/pghero/space_stats_generator.rb
pghero-2.5.0 lib/generators/pghero/space_stats_generator.rb
pghero-2.4.2 lib/generators/pghero/space_stats_generator.rb
pghero-2.4.1 lib/generators/pghero/space_stats_generator.rb
pghero-2.4.0 lib/generators/pghero/space_stats_generator.rb