Sha256: e24d991f0d769837ff0b2f99424b97e3fb83e61ad9e74bba8fe0eb4bebdd15a3

Contents?: true

Size: 575 Bytes

Versions: 77

Compression:

Stored size: 575 Bytes

Contents

class CreateTransplantRejectionTreatments < ActiveRecord::Migration[5.2]
  def change
    within_renalware_schema do
      # The treatment given for an episode
      create_table :transplant_rejection_treatments do |t|
        t.text :name, null: false, index: :unique
        t.integer :position, index: true, null: false, default: 0
        t.timestamps null: false
      end

      add_reference(
        :transplant_rejection_episodes,
        :treatment,
        foreign_key: { to_table: :transplant_rejection_treatments },
        index: true
      )
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
renalware-core-2.0.147 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.146 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.145 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.144 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.143 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.142 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.141 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.140 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.139 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.138 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.137 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.136 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.135 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.134 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.133 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.132 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.131 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.130 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.129 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.128 db/migrate/20190617121528_create_transplant_rejection_treatments.rb