Class: Pghero::Generators::QueryStatsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Pghero::Generators::QueryStatsGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/generators/pghero/query_stats_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_migration ⇒ Object
10 11 12 |
# File 'lib/generators/pghero/query_stats_generator.rb', line 10 def copy_migration migration_template "query_stats.rb", "db/migrate/create_pghero_query_stats.rb", migration_version: migration_version end |
#migration_version ⇒ Object
14 15 16 |
# File 'lib/generators/pghero/query_stats_generator.rb', line 14 def migration_version "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]" end |