Sha256: 907d59e6f66b7bd5d55e4813d940323b0b71a25b89f597804622d18c13f4566d

Contents?: true

Size: 986 Bytes

Versions: 28

Compression:

Stored size: 986 Bytes

Contents

class CreateMedicationDeliveryEventPrescriptions < ActiveRecord::Migration[5.2]
  def change
    # rubocop:disable Rails/CreateTableWithTimestamps
    within_renalware_schema do
      create_table(
        :medication_delivery_event_prescriptions,
        comment: "A cross reference table between delivery_events and prescriptions"
      ) do |t|
        t.references(
          :event,
          foreign_key: { to_table: :medication_delivery_events },
          index: false,
          null: false
        )
        t.references(
          :prescription,
          foreign_key: { to_table: :medication_prescriptions },
          index: false,
          null: false
        )
      end
      # rubocop:enable Rails/CreateTableWithTimestamps

      add_index(
        :medication_delivery_event_prescriptions,
        [
          :event_id,
          :prescription_id
        ],
        unique: true,
        name: :idx_medication_delivery_event_prescriptions
      )
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
renalware-core-2.1.1 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.1.0 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.167 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.166 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.165 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.164 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.163 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.162 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.161 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.160 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.159 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.158 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.157 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.156 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.155 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.153 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.152 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.151 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.149 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb
renalware-core-2.0.148 db/migrate/20200301124300_create_medication_delivery_event_prescriptions.rb