Sha256: ae9a020bdd4c6c58eba69fb19924bfa1a4424fb13421da7900f253fee5535ea9

Contents?: true

Size: 387 Bytes

Versions: 7

Compression:

Stored size: 387 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def change
    create_table :pghero_query_stats do |t|
      t.text :database
      t.text :user
      t.text :query
      t.integer :query_hash, limit: 8
      t.float :total_time
      t.integer :calls, limit: 8
      t.timestamp :captured_at
    end

    add_index :pghero_query_stats, [:database, :captured_at]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pghero-1.6.5 lib/generators/pghero/templates/query_stats.rb
pghero-1.6.4 lib/generators/pghero/templates/query_stats.rb
pghero-1.6.3 lib/generators/pghero/templates/query_stats.rb
pghero-1.6.2 lib/generators/pghero/templates/query_stats.rb
pghero-1.6.1 lib/generators/pghero/templates/query_stats.rb
pghero-1.6.0 lib/generators/pghero/templates/query_stats.rb
pghero-1.5.3 lib/generators/pghero/templates/query_stats.rb