Sha256: 02ae54aa626194059a93c78b34f459deb24122e8bd46f67cdff17883baf05b50
Contents?: true
Size: 757 Bytes
Versions: 73
Compression:
Stored size: 757 Bytes
Contents
class AddIndexToDiarySlots < ActiveRecord::Migration[5.1] def change # 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
Version data entries
73 entries across 73 versions & 1 rubygems