chore: create index in separate migration

This commit is contained in:
Nelson Jovel 2024-02-09 15:57:29 -08:00
parent 2cf8ddda69
commit cf31eee44c
4 changed files with 7 additions and 4 deletions

View file

@ -5,7 +5,5 @@ class CreateDashboardAcademicYears < ActiveRecord::Migration[7.1]
t.timestamps
end
remove_index :dashboard_academic_years, :range
add_index :dashboard_academic_years, :range, unique: true
end
end

View file

@ -0,0 +1,5 @@
class AddUniqueIndexToDashboardAcademicYear < ActiveRecord::Migration[7.1]
def change
add_index :dashboard_academic_years, :range, unique: true
end
end