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.1.1 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.1.0 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.167 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.166 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.165 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.164 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.163 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.162 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.161 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.160 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.159 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.158 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.157 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.156 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.155 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.153 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.152 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.151 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.149 db/migrate/20190617121528_create_transplant_rejection_treatments.rb
renalware-core-2.0.148 db/migrate/20190617121528_create_transplant_rejection_treatments.rb