canvas-lms/db/migrate/20200330150024_add_active_e...

12 lines
357 B
Ruby

# frozen_string_literal: true
class AddActiveEnrollmentsIndex < ActiveRecord::Migration[5.2]
tag :postdeploy
disable_ddl_transaction!
def change
add_index :enrollments, [:course_id], where: "workflow_state = 'active'",
name: "index_enrollments_on_course_when_active", algorithm: :concurrently
end
end