Sha256: 756f37f39dbf6ba5701e6e8bd018557b3134a08f0442a057e8c06103e239ad55
Contents?: true
Size: 820 Bytes
Versions: 98
Compression:
Stored size: 820 Bytes
Contents
class AddIndexToDiarySlots < ActiveRecord::Migration[5.1] def change within_renalware_schema do # Scoped to a diary, the combination of day + station + diurnal_period is unique add_index :hd_diary_slots, [:diary_id, :station_id, :day_of_week, :diurnal_period_code_id], name: :hd_diary_slots_unique_by_station_day_period, unique: true, where: "deleted_at IS NULL" # Scoped to a diary, a patient can only occur once in any combination of day + diurnal_period add_index :hd_diary_slots, [:diary_id, :day_of_week, :diurnal_period_code_id, :patient_id], name: :hd_diary_slots_unique_by_day_period_patient, unique: true, where: "deleted_at IS NULL" end end end
Version data entries
98 entries across 98 versions & 1 rubygems