mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
16 lines
601 B
Ruby
16 lines
601 B
Ruby
class AddStatsPerformanceIndexes < ActiveRecord::Migration[8.0]
|
|
def change
|
|
add_index :heartbeats, [ :user_id, :time, :project ],
|
|
name: "idx_heartbeats_user_time_project_stats",
|
|
where: "deleted_at IS NULL"
|
|
|
|
add_index :heartbeats, [ :user_id, :time, :language ],
|
|
name: "idx_heartbeats_user_time_language_stats",
|
|
where: "deleted_at IS NULL"
|
|
|
|
add_index :heartbeats, [ :user_id, :project, :time ],
|
|
name: "idx_heartbeats_user_project_time_stats",
|
|
where: "deleted_at IS NULL AND project IS NOT NULL"
|
|
end
|
|
end
|