disable pghero migration in prod

This commit is contained in:
olegphenomenon 2021-11-25 10:22:15 +02:00
parent 8030079197
commit d72ebd1dc2

View file

@ -1,15 +1,17 @@
class CreatePgheroQueryStats < ActiveRecord::Migration[6.1] class CreatePgheroQueryStats < ActiveRecord::Migration[6.1]
def change def change
create_table :pghero_query_stats do |t| if Rails.env.development?
t.text :database create_table :pghero_query_stats do |t|
t.text :user t.text :database
t.text :query t.text :user
t.integer :query_hash, limit: 8 t.text :query
t.float :total_time t.integer :query_hash, limit: 8
t.integer :calls, limit: 8 t.float :total_time
t.timestamp :captured_at t.integer :calls, limit: 8
end t.timestamp :captured_at
end
add_index :pghero_query_stats, [:database, :captured_at] add_index :pghero_query_stats, [:database, :captured_at]
end end
end
end end